• 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

Session Tracking is this correct

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are having a web application in which we need to maintain the sessions.
for the same for every page except the login page we include a header.jsp
When user successfully logs in we save a javabean validUser in session scope.

the contents of the header.jsp which we include in every page are
<jsp:useBean id="validUser" class="com.util.validUserBean" scope="session"/>
<c:if test="${validUser.userId<=0}">

<jsp:forward page="login.jsp"/>
</c:if>

I want to know wheter our technique is good?What things can go wrong in this technique?
Are we really tracking the session through this?
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its just ok, but i would suggest using the security realm of your web-server and let the web-server handle the session tracking of your user.
 
reply
    Bookmark Topic Watch Topic
  • New Topic