aspose file tools*
The moose likes Struts and the fly likes clear-cache after user logged-in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "clear-cache after user logged-in" Watch "clear-cache after user logged-in" New topic
Author

clear-cache after user logged-in

luckay win
Ranch Hand

Joined: Sep 21, 2010
Posts: 36
Hello All,

I am very new to Struts, now I am learning Struts 1 on Netbeans 6.9

currently, I am trying to develop a simple login page.. it done already ..
now, I want to clear-cache after user logged-in .. so they should be unable to go back to the previous page..
could any body please advise.. how to do this?

please help

thanks & regards
newbiestruts
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

This can be done using javascript.
luckay win
Ranch Hand

Joined: Sep 21, 2010
Posts: 36
but how to apply it on struts 1? ..

could you please help?
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

You might be forwardign the user to some page (like Home Page) after successful login. You can call a java script in this page (on page load evnt) to clear the history of the browser.

But here is another issue that the browser history will be creared every thime the user will visit the Home Page.
How to resolve this is an exercise for you

And also please change your name as per the policy.
luckay win
Ranch Hand

Joined: Sep 21, 2010
Posts: 36
Thanks,
but I thought I should use server side to redirect the from the previous page to the new page.
am I correct?
so I think I have to check the static boolean variable (true is logged-out and false is not-logout), the default is logged-out, so the user should start from loginpage.jsp..
and if the user had logged-out then it redirected to loginpage.jsp

I should check the value on every page .. if the value is true then it must be redirected to loginpage.jsp..

what I don't understand in struts is .. how to get the static class value from .jsp?

I need advise..

many thanks in advance

Regards
Luc



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: clear-cache after user logged-in