Frequently Asked Questions

Help Center Search

Configuring a JSP Handler to Use with JSP and Web.xml

Print this Article
Comment on this Article
Last Updated: November 14, 2008 11:27 AM

If you are using JSP and a custom web.xml file, you need to configure a JSP handler in the web.xml file. You can configure it using the following information:

<web-app>
    <servlet-mapping>
         <servlet-name>jsp</servlet-name>
         <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
         <welcome-file>index.html</welcome-file>
         <welcome-file>index.htm</welcome-file>
         <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <servlet-mapping>
         <servlet-name>jsp</servlet-name>
         <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
</web-app>