jQuery in Action, 3rd edition
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 63351

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] [Bear's FrontMan] [About Bear] [Books by Bear]
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

see this link for information about web.xml tags http://edocs.bea.com/wls/docs61/webapp/webappdeployment.html#1014811

use of url patterns is explained in servlets specification http://www.orionserver.com/docs/specifications/servlet-2_3-fcs-spec.pdf

SCJP 5.0, SCWCD 5, preparing for SCDJWS
I agree. Here's the link: http://aspose.com/file-tools
subject: servlet mapping
jQuery in Action, 3rd edition