• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unsure about this mapping

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have a servlet filter and I want to map it to whole web application (I mean every page in the application like JSP, HTML....).
but I'm not sure about the url-pattern element's value.
maybe it should be :
<url-pattern>/*</url-pattern>
right ??
 
Randy James
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently tried a similiar mapping. It read like the following:

<servlet-mapping>
<url-pattern>/</url-pattern>
<servlet-name>InspectURLServlet</servlet-name>
</servlet-mapping>


Effectively every URL at the root level would enter the service(), doGet(), etc. methods of my Servlet class. However, I noticed some weird things happening. For example, all of my relative paths in my jsp pages seemed to get lost. Not wanting to reassign all of my resources absoltely, I gave up on this approach.

R
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!