1

I understand that I can map HTML files such that the JSP engine treats files with .html extensions the same as they do for .jsp files. However, what I wish to do is more precise than that. I want my JSP engine, Tomcat 5.5, to treat only those HTML files in a specific subdirectory, SecAuth, as JSP files.

I added the following in Tomcat's web.xml file and it did not work (in fact, an error ensued):

<servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>SecAuth/*.html</url-pattern>
</servlet-mapping>

Is it clear what I'm trying to accomplish? Any help would be appreciated.

Thank you.

user717236
  • 4,959
  • 19
  • 66
  • 102
  • 1
    Also maybe these links will help you: [.html pages as .jsp pages](http://tomcat.10.x6.nabble.com/html-pages-as-jsp-pages-td2144137.html) and [How to map non-jsp URL to a JSP?](http://mail-archives.apache.org/mod_mbox/tomcat-users/200107.mbox/%3CPine.BSF.4.21.0107271807540.7976-100000@localhost%3E) – informatik01 Apr 11 '13 at 16:01
  • 1
    btw You are not using the valid url patterns. Read here about mapping rules: http://stackoverflow.com/a/14225540/814702 – informatik01 Apr 11 '13 at 16:03
  • 1
    Thank you. Both links were supremely useful. I changed it to /SecAuth/* to conform to standards. I think that might do the trick. Thank you for your help. If you can just summarize what you wrote in the answer below, I'll give you a check. Thanks again. – user717236 Apr 11 '13 at 17:30

0 Answers0