Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet mapping

 
Ionut Barau
Greenhorn
Posts: 25
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you are asking. The URL pattern can be whatever makes sense and doesn't conflict with the other patterns.
 
Venkata Kumar
Ranch Hand
Posts: 110
Firefox Browser Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic