Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting extra path info

 
Nitin Dubey
Ranch Hand
Posts: 126
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Suppose :
http://localhost:8080/mycontext/MyServlet/ExtraPathInfo
Where "MyServlet" is the actual servlet.

How can I get the Extra Path Info ? When I try with this URL the tomcat container looks for servlet with name "ExtraPathInfo" and not "MyServlet" which is the obvious behaviour.

Is there any configuration related thing that I need to take care of ?

Waiting for replies,


Nitin Dubey
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to define the mapping as /MyServlet/*, and maybe /MyServlet/ depending on your requirements.
 
Nitin Dubey
Ranch Hand
Posts: 126
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx. that worked
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Suppose :
http://localhost:8080/mycontext/MyServlet/ExtraPathInfo
Where "MyServlet" is the actual servlet.

How can I get the Extra Path Info ?


Use request.getPathInfo()..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic