Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I get the last page served up?

 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get the last page that was served up from the Servlet? Is this possible?
 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should store the name of the last page in a session variable.
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could.. but is there a way to get the page out of the response?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the user got to the current page by clicking on a link, the browser will send up a header named 'Referer' [correct spelling].

So will return it. If they've come to your page by typing the address directly or from a bookmark in the browser, the value will be null.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic