• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Tracking is this correct

 
Sagar J Jambhulkar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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?
 
arnel nicolas
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!