• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

click on previous should not return too page

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when I logout it return to the page principal but when I click on previous it should not be return

Hello everybody,

I have a problem it should when I click previous  after login it should not be return.
I used this documentation ==> https://struts.apache.org/docs/simplelogin-with-session.html

I want that the session be invalidate or close but how I can make it with struts2 in the principal page jsp

<s:if test="#session.login != 'true'">
<jsp:forward page="<%= request.getContextPath() %>/login.jsp" /> // I have problem here
</s:if>
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that example will work the way you expect because when you click the "previous" button on a browser, it will simply load the previous page from its cache, not do a round-trip to the server where the code you quoted will be processed.  
Also, if you are looking for a "real world" example of security, I recommend the JEE Tutorial chapter on Securing Web Applications.  The declarative method described in the tutorial is more reliable than the programmatic method in your example and it delegates the details of security to the web server, allowing you to concentrate on building your app.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic