Meaningless Drivel is fun!
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

Ionut Barau

Joined: Feb 18, 2008
Posts: 25
Hi.I am new to Servlets and i have a question about servlet mapping.Does <url-pattern> in web.xml have to be the same as the path of the request? Can the path in <url-pattern> point to another location? or it has to be the same as the location of the jsp that requests for the servlet that I am mapping?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Not sure what you are asking. The URL pattern can be whatever makes sense and doesn't conflict with the other patterns.

[Asking smart questions] [About Bear] [Books by Bear]
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

see this link for information about web.xml tags

use of url patterns is explained in servlets specification

SCJP 5.0, SCWCD 5, preparing for SCDJWS
I agree. Here's the link:
subject: servlet mapping
It's not a secret anymore!