This should be relatively simple to do but I've yet to find a description of how to do it.
My setup is a simple web app that processes every request through a servlet (I'll call it MyEverythingServlet for this question). Here's a slightly modified version of my web.xml:
<servlet>
<servlet-name>MyEverythingServlet</servlet-name>
<servlet-class>blah.blah.blah.MyEverythingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyEverythingServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Right now, the servlet is pretty simple and either does some work (when work.do is part of the path) and if a .txt file is specified in the path, we'll do some validation and then load the file and send the text as the response:
response.getOutputStream().print( content );
What I'd like to do is either:
- Inside the servlet, if the request is a URL to a .jsp file, I'd like to be able to have the container interpret the JSP scriptlet parts/taglib stuff before I write the String to the response.
- Change my web.xml to have it process .jsp files outside of MyEverythingServlet.