File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet mapping" Watch "Servlet mapping" New topic

Servlet mapping

Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1090
Hi all
Please explain as to what all servlets will map to the BlueServlet.
Assuming the web app is colorapp.

Should'nt /colorapp/hello/blue/ map to BlueServlet.
Please provide examples of what all servlets will match the mapping.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Good question Anupam. If anyone has extra resources (besides the SCWCD study kit) that explain this please provide. I'm having heaps of problems with this.

I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
Trying using
I think the trailing slash (/) after the word blue is causing a problem, and the tag name should be "url-pattern".
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
the following entry maps the BlueServlet to all request under the
path ..../blue/..
I agree. Here's the link:
subject: Servlet mapping
It's not a secret anymore!