This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "SaveToken" Watch "SaveToken" New topic


pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 303

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: 689


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" />

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
subject: SaveToken
It's not a secret anymore!