jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes mapping is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "mapping is not working" Watch "mapping is not working" New topic

mapping is not working

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

Hola folks.
I have some questions about servlets mapping (from The J2EE 1.4 tutorial).
we have a servlet called LawnServlet and its pattern is /lawn/*
we have constructed the following request :
(/catalog is the context)
trying this example at home, the index.html is not accessed.
why ?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
ALL requests to /catalog/lawn and anything under it are sent to your servlet. Anything after it is effectively thrown away (though you can get it by reading the URL string from the request).

Ken Robinson
Ranch Hand

Joined: Dec 23, 2003
Posts: 101
If you want to request to hit your object and then cascade (or Chain) to the resource, use a Filter, not a Servlet.

With a Servlet you get full control and the resource is not hit at all.

With a Filter you still get full control, but a call to chain.doFilter() will return control to the next resource (an other Filter, Servlet or static HTML/JPG... file).
I agree. Here's the link: http://aspose.com/file-tools
subject: mapping is not working
It's not a secret anymore!