• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is path info?

 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a method HttpServletRequest.getPathInfo(). Could anybody tell me what is pathinfo?

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was returned when you called this method in a servlet?

It's the additional pieces of the URL path that are given beyond the actual resource name. E.g. if you access a URL "http://www.server.com/MyApp/MyServlet/MyPathInfo", and the servlet that handles this request is "MyServlet", then "/MyPathInfo" would be the path info (I'm not sure if the slash would be included or not).

Path info goes back to the days of CGI, and isn't much used these days. Usually one would use form parameters to achieve the same purpose now.
[ February 28, 2007: Message edited by: Ulf Dittmer ]
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks much Ulf.

(I'm not sure if the slash would be included or not)


Yes. I just tested it. It includes the "/".
[ February 28, 2007: Message edited by: Tridib Samanta ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic