JSP pseudo-Static technology

Source: Internet
Author: User

First you need to download Urlrewritefilter-4.0.3.jar

I have uploaded to csdn free download: http://download.csdn.net/detail/qianquan3/7904549

Put the Urlrewritefilter-4.0.3.jar into the Lib directory, and

The new urlrewrite.xml content in the Web-inf directory is as follows:
<?xml version= "1.0" encoding= "UTF-8"?><urlrewrite>    <rule>     <from>/index.html</ from>     <to>/index.jsp</to>  </rule> </urlrewrite>

Add the following code to Web. XML:
<filter>    <filter-name>UrlRewriteFilter</filter-name>    <filter-class> Org.tuckey.web.filters.urlrewrite.urlrewritefilter</filter-class></filter><filter-mapping>    <filter-name>UrlRewriteFilter</filter-name>    <url-pattern>/*</url-pattern>    <dispatcher>REQUEST</dispatcher>    <dispatcher>forward</dispatcher></ Filter-mapping>

Restart the service, you are done!

JSP pseudo-Static technology

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.