Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the path info as returned by getPathInfo of httpServletRequest

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Can anyone give me a practical example of the path info as returned by getPathInfo() of HttpServletRequest. Apparently it is different from the servlet path and the query string. What is it then?

Thanks in advance,

Julien.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Julien,
Suppose you have your servlet to match "/javaranch/*" and I type the URL "mysite.com/javaranch/bigmoose?name=value"

The components are:
domain - mysite.com
servlet path - javaranch
path info - bigmoose
query string - name=value

This could be used if you have a servlet that processes many types of requests.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such as a Front Contriller.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic