another session problem

Reply

Join Date: Jul 2007
Posts: 31
Reputation: claudiu_is is an unknown quantity at this point 
Solved Threads: 1
claudiu_is's Avatar
claudiu_is claudiu_is is offline Offline
Light Poster

another session problem

 
0
  #1
Dec 12th, 2007
I'm having a session problem with jsf. I've googled abut sessions and none of the results answer this question: what happens when a user logs in, copies the link, logs out and pastes the link in the browser? They say that I should validate the user when the page loads and make two forwards: one towards an error page and one towards a success page. But what if the user copies the success page's link? When or where is it's validation? And how can I solve all that without using scriptlets in my jsp pages?
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,449
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 261
Moderator
masijade's Avatar
masijade masijade is online now Online
Nearly a Posting Maven

Re: another session problem

 
0
  #2
Dec 12th, 2007
You should be using forward, and not redirect. The user should only ever see the url he originally clicked on then. Also, use filters to perform the authentications, not the JSP itself.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: claudiu_is is an unknown quantity at this point 
Solved Threads: 1
claudiu_is's Avatar
claudiu_is claudiu_is is offline Offline
Light Poster

Re: another session problem

 
0
  #3
Dec 12th, 2007
I did say fwd, not redirect
I can't seem to find a complete example of a session based application which states all the steps in order, from the beginning to the end, which part goes where and why.
If anyone knows any, please let me know or if anyone would create one for me here, lots of thanks. It should be for a beginner and it shouldn't assume I can guess large chunks of code in the place of an important operation
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC