aspose file tools*
The moose likes Servlets and the fly likes What is the path info as returned by getPathInfo of httpServletRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is the path info as returned by getPathInfo of httpServletRequest" Watch "What is the path info as returned by getPathInfo of httpServletRequest" New topic
Author

What is the path info as returned by getPathInfo of httpServletRequest

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
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

Joined: May 26, 2003
Posts: 30929
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Such as a Front Contriller.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: What is the path info as returned by getPathInfo of httpServletRequest