File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extract information form URL

 
meraj zia
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My application context root is '/rr/la' and my login page is '/login.xhtml'. But i need to extract some information from the URL. So the request can come like 'http://10.105.20.9:7013/rr/la/abcd/efgh/login.xhtml'.

I need to extract 'abcd/efgh'. Extraction is easy. But my problem is that when i do 'request.getRequestURI()' in my Servlet Filter it gives me '/rr/la/login.xhtml' rather that '/rr/la/abcd/efgh/login.xhtml'.

How to get this information.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried request.getPathInfo?
 
meraj zia
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya i've it's returning me null.

Please find the mapping below

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic