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

request origin

 
Srividya Shiv
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I want to know the page(html/jsp) from which a request has originated. Is there any method to get this.
thanks
vidya
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this what you are looking for?
StringBuffer page = HttpUtils.getRequestURL(HttpServletRequest request);
If your request is forwarded to different pages, on the first page issue this method call, attach it to the request object and forward it along with all the other request information. Then you can retrieve it on your last page.
[This message has been edited by Brian Nice (edited December 06, 2000).]
 
Srividya Shiv
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian
I got it.
Originally posted by Brian Nice:
Is this what you are looking for?
StringBuffer page = HttpUtils.getRequestURL(HttpServletRequest request);
If your request is forwarded to different pages, on the first page issue this method call, attach it to the request object and forward it along with all the other request information. Then you can retrieve it on your last page.
[This message has been edited by Brian Nice (edited December 06, 2000).]

 
Kamakshi Mahadevan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ihave a similar problem. My browser always shows only servlet names. It does not display intermediate jsp or html page names.
Is there a way of displaying the URL of the exact page that's currently executing everytime??
Kamakshi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic