Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

clear-cache after user logged-in

 
luckay win
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be done using javascript.
 
luckay win
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how to apply it on struts 1? ..

could you please help?
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic