File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

servlet mapping

Ionut Barau
Greenhorn

Joined: Feb 18, 2008
Posts: 20
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
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

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
 
Similar Threads
Path Not Reaching Servlet
Problem with web.xml (WebLogic Server 8.1 SP2) ?
Why two places to define link in servlet class and url-pattern
Dount in web.xml
STRUTS - Invalid path