You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bikash Paul <bi...@yahoo.com> on 2003/09/16 13:05:22 UTC

Query on element of web.xml file ??

Hi all friends,

If my web application's web.xml file contains this:

<filter-mapping>
<filter-name>Test Filter</filter-name>
<url-pattern>/*.jsp</url-pattern>
</filter-mapping>

then the filter doesn't run when I invoke a JSP in the
application's top-level directory.

If I change the url-pattern to this:

<url-pattern>*.jsp</url-pattern>

then the filter does run.

Can any one please explain it why it is not working
with /*.jsp.Iam little bit confused about
<url-pattern> element of web.xml file.Can any one plz
give me some tutorial link for this element so that I
can clear my concept from there coz Iam also confused
about <url-pattern> element in case of
<servlet-mapping>.Any help will be highly appreciated.

Regards
Bikash 



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: Query on element of web.xml file ??

Posted by Jon Wingfield <jo...@mkodo.com>.
Read chapter 11 of the servlet 2.3 specification. It's all there.
The spec is available from here:
http://www.jcp.org/aboutJava/communityprocess/final/jsr053/


Bikash Paul wrote:

> Hi all friends,
> 
> If my web application's web.xml file contains this:
> 
> <filter-mapping>
> <filter-name>Test Filter</filter-name>
> <url-pattern>/*.jsp</url-pattern>
> </filter-mapping>
> 
> then the filter doesn't run when I invoke a JSP in the
> application's top-level directory.
> 
> If I change the url-pattern to this:
> 
> <url-pattern>*.jsp</url-pattern>
> 
> then the filter does run.
> 
> Can any one please explain it why it is not working
> with /*.jsp.Iam little bit confused about
> <url-pattern> element of web.xml file.Can any one plz
> give me some tutorial link for this element so that I
> can clear my concept from there coz Iam also confused
> about <url-pattern> element in case of
> <servlet-mapping>.Any help will be highly appreciated.
> 
> Regards
> Bikash 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 




Re: Query on element of web.xml file ??

Posted by Jon Wingfield <jo...@mkodo.com>.
Read chapter 11 of the servlet 2.3 specification. It's all there.
The spec is available from here:
http://www.jcp.org/aboutJava/communityprocess/final/jsr053/


Bikash Paul wrote:

> Hi all friends,
> 
> If my web application's web.xml file contains this:
> 
> <filter-mapping>
> <filter-name>Test Filter</filter-name>
> <url-pattern>/*.jsp</url-pattern>
> </filter-mapping>
> 
> then the filter doesn't run when I invoke a JSP in the
> application's top-level directory.
> 
> If I change the url-pattern to this:
> 
> <url-pattern>*.jsp</url-pattern>
> 
> then the filter does run.
> 
> Can any one please explain it why it is not working
> with /*.jsp.Iam little bit confused about
> <url-pattern> element of web.xml file.Can any one plz
> give me some tutorial link for this element so that I
> can clear my concept from there coz Iam also confused
> about <url-pattern> element in case of
> <servlet-mapping>.Any help will be highly appreciated.
> 
> Regards
> Bikash 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org