This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes Query  on url-pattern element of web.xml file ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Query  on url-pattern element of web.xml file ??" Watch "Query  on url-pattern element of web.xml file ??" New topic
Author

Query on url-pattern element of web.xml file ??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
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
[ September 16, 2003: Message edited by: Bikash Paul ]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
I sort of explain it here. How is the JSP getting called?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Query on url-pattern element of web.xml file ??
 
Similar Threads
url pattern in servlet filter
Configuring Filters in Tomcat 5
web.xml: url-pattern in filter-mapping
Problem with the url-pattern for my filter-mapping
url-pattern for filters