File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


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
I agree. Here's the link:
subject: SaveToken
It's not a secret anymore!