jsp servlet filter jsp suffix_html/css_WEB-ITnose
I now have such a requirement: I want to change the suffix of all jsp pages to HTML or htm. Now I wrote a filter myself and changed jsp to html, but when forwarding the page, it will fail because XXXX.html does not exist in the project at all. How can I achieve the above filtering? I hope Niu Niu can give me some advice
Reply to the discussion (solution)
Niu Niu guys, have you never encountered such a problem? Or I didn’t express it clearly enough:
If a website made with jsp wants to be encrypted into html, that is, the address bar displays .html form, or .htm, do not display it as .jsp, but it is actually implemented by jsp!
If there is a solution, I hope it can help.
Use URL rewriting
Reference: JSP URL rewriting-urlrewrite
Niu Niu, have you not encountered such a problem? Or I didn’t express it clearly enough:
If a website made with jsp wants to be encrypted into html, that is, the address bar displays .html form, or .htm, do not display it as .jsp, but it is actually implemented by jsp!
If there is a solution, I hope it can help.
Thank you, I have solved the problem using urlrewrite now
Using URL rewrite
Reference: JSP URL rewrite-urlrewrite
Niu Niu, have you never encountered such a problem? Or I didn’t express it clearly enough:
If a website made with jsp wants to be encrypted into html, that is, the address bar displays .html form, or .htm, do not display it as .jsp, but it is actually implemented by jsp!
If there is a solution, I hope it can help.
You’re welcome, I’m glad the problem has been solved
Thank you, I now use urlrewrite to solve the problem

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to open files with the suffix .vsd In daily computer use, we often encounter various types of file formats, and one of the common file formats is files with the suffix .vsd. So, how should we open this file with the suffix .vsd? First, we need to understand the meaning and purpose of .vsd files. VSD is the file format of Visio, a graphical drawing tool developed by Microsoft. VSD files are mainly used to create and edit various types of diagrams

When using Quark Browser, there is a function to filter duplicate files. Some friends are not very familiar with this. Here I will introduce how to turn on this function. If you are interested, come and take a look with me. 1. First, click "Quark Browser" on your mobile phone to enter the interface, then click and select "Quark Network Disk" in the options in the middle of the page to open and enter. 2. Find "Backup Settings" in the lower part of the Quark network disk interface, and click to open it, as shown in the figure below: 3. Next, on the page you enter, there is a "Filter Duplicate Files", which is displayed behind it There is a switch button. Click the circular slider on it and set it to color to turn on this function. When you continue to back up files, duplicate files will be skipped to save network disk capacity.

Python implements XML data filtering and filtering. XML (eXtensibleMarkupLanguage) is a markup language used to store and transmit data. It is flexible and scalable and is often used for data exchange between different systems. When processing XML data, we often need to filter and filter it to extract the information we need. This article will introduce how to use Python to filter and filter XML data. Import the required modules Before starting, we

How to use PHP functions to search and filter data? In the process of developing using PHP, it is often necessary to search and filter data. PHP provides a wealth of functions and methods to help us achieve these operations. This article will introduce some commonly used PHP functions and techniques to help you search and filter data efficiently. String search Commonly used string search functions in PHP are strpos() and strstr(). strpos() is used to find the position of a certain substring in a string. If it exists, it returns

PHP and PHPMAILER: How to implement automatic filtering of mail sending? In modern society, email has become one of the important ways for people to communicate. However, with the popularity and widespread use of email, the amount of spam has also shown an explosive growth trend. Spam emails not only waste users' time and network resources, but may also bring viruses and phishing behaviors. Therefore, when developing the email sending function, it becomes crucial to add the function of automatically filtering spam. This article will introduce how to use PHP and PHPMai

PHP Data Filtering: Processing Date and Time Input Overview: When developing web applications, it is often necessary to process date and time data entered by the user. Since user input may contain various formats and errors, effective data filtering and validation are necessary to ensure data accuracy and security. This article explains how to use PHP to handle date and time input, and provides corresponding code examples. Filtering and validation principles: Before processing date and time inputs, you first need to determine the corresponding filtering and validation principles. Here are some common ones

JavaServlet can be used for: 1. Dynamic content generation; 2. Data access and processing; 3. Form processing; 4. File upload; 5. Session management; 6. Filter. Example: Create a FormSubmitServlet to handle form submission, taking name and email as parameters, and redirecting to success.jsp.

PHP Data Filtering: How to Prevent File Upload Vulnerabilities The file upload function is very common in web applications, but it is also one of the most vulnerable to attacks. Attackers may exploit file upload vulnerabilities to upload malicious files, leading to security issues such as server system intrusion, user data being leaked, or malware spreading. In order to prevent these potential threats, we should strictly filter and inspect files uploaded by users. Verify file type An attacker may rename the .txt file to a .php file and upload
