But I got the exception below when Tomcat/5.0.25 was starting with the settings. As far as I know, the setting should work....
... java.lang.IllegalArgumentException: Invalid <url-pattern> /folderB/*.jsp in servlet mapping at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) ...
If I remove the <servlet-mapping> part, the engine starts fine.
Does anyone know how I can solve the problem? Thank you for your time.
[ July 06, 2004: Message edited by: Yunseuk Kim ] [ July 06, 2004: Message edited by: Yunseuk Kim ]
I don't know why that wouldn't work. Perhaps you can achieve the same goal by mapping the url to a filter, and have the filter forward the request to your jsp page. Put something like this in your web.xml:
Hi Yunseuk, I wonder if what you want is possible just by adding,servlet..and servlet-mapping tags.
Cause after digging into web.xml of conf/web.xml and myapps/WEB-INF/web.xml I could understand the following.
You have an entry in conf/web.xml as
Which is sensible, as your jsp is not executed by server, its an servlet, converted of this jsp who plays role of execution, so obviously you need some one to take charge of calling this translated servlet when .jps page is requested, and this some one is org.apache.jasper.servlet.JspServlet.
Now if we try to comment this mapping then every *.jsp page request will be considered as FTP request, and sever will simply display this jsp file source code) with out executing it.
No if we add following mapping in mywebapps/WEB-INF/web.xml..
SO i guess this entry should overwrite (take precedence over) the entry in conf/web.xml which says every request ending with *.jsp must be handled by org.apache.jasper.servlet.JspServlet..this sounds cool..but if this happens then server will pass following entry /FolderB/Test.jsp to folderA/MY.jsp
and will try to find a Servletcalled MY.jsp....resulting in 404 Error..., Servlet /folderA/my.jsp not found...
I don't know if I'm 100 % correct so waiting eagerly for experts comment ... Kindly put your thoughts