wood burning stoves 2.0*
The moose likes Servlets and the fly likes filter mapping to specific JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "filter mapping to specific JSP" Watch "filter mapping to specific JSP" New topic
Author

filter mapping to specific JSP

Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

We can map to a specific servlet:

And we can do all JSPs:
<url-pattern>*.jsp</url-pattern>
But when I try to map to
<url-pattern>index.jsp</url-pattern>
This doesn't work in Tomcat 5.0.30 I get
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: Invalid <url-pattern> index.jsp in filter mapping
I looked at the 2.3 servlet spec and don't see anything about this. I am thinking this isn't possible? I am not sure why.

Thanks,
Tom
[ August 09, 2007: Message edited by: Ben Souther ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you tried:
/index.jsp

or

*/index.jsp

?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sundaram Karthick
Greenhorn

Joined: Jun 26, 2007
Posts: 24
Hi,
I tried it for /index.jsp and added the following in web.xml and it works fine for me. I used this in tomcat 6.0.10
<filter-mapping>
<filter-name>Servlet Mapped Filter</filter-name>
<url-pattern>/index.jsp</url-pattern>
</filter-mapping>

hope this helps


SCJP 1.5, SCWCD 1.4, SCBCD 5
Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

/index.jsp
Yes that works

Thanks,
Tom
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: filter mapping to specific JSP