wood burning stoves 2.0*
The moose likes Struts and the fly likes SaveToken Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "SaveToken" Watch "SaveToken" New topic
Author

SaveToken

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300

Hi List[],

I have login page on submitting the login page and after validating the username and password its open main page.

In main page when i press the back button its still resubmit the values of login page.
But i only want the page should submit once time.

Please help me .

Below is my code
Action Class

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


Hi,

You just check session at your login page that session is registered your user value.

If yes ? --> then forward to your location jsp
if not ? --> then not to do any thing..

just like this

<s:if test="#session.user == user">
<jsp:forward page="/pages/homePage.jsp" />
</s:if>


This will automatically redirect to you homePage.jsp if you are login and your session is registered.



Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SaveToken
 
Similar Threads
servlet action is not availbe
A Problem in struts 1.1
change password
Can't create connection with oracle
Need an attribute to be available in different places (SOLVED)