tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat/src/admin/contextAdmin sessionExpire.jsp
Date Sat, 25 Aug 2001 14:13:36 GMT
nacho       01/08/25 07:13:36

  Modified:    src/admin/contextAdmin sessionExpire.jsp
  Log:
  Avoiding NPE if the session being invalitated does not exist.
  
  Revision  Changes    Path
  1.2       +11 -3     jakarta-tomcat/src/admin/contextAdmin/sessionExpire.jsp
  
  Index: sessionExpire.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/admin/contextAdmin/sessionExpire.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sessionExpire.jsp	2001/03/23 02:14:17	1.1
  +++ sessionExpire.jsp	2001/08/25 14:13:36	1.2
  @@ -11,12 +11,20 @@
   <adm:moduleAdmin var="store" 
   		 type="org.apache.tomcat.modules.session.SimpleSessionStore" />
   
  -  <h3>Invalidate <%= request.getParameter("id" ) %></h3>
  +  <h3>Invalidating  <%= request.getParameter("id" ) %></h3>
   
  -<% org.apache.tomcat.core.ServerSession s=store.findSession( ctx, 
  +<% 
  +   org.apache.tomcat.core.ServerSession s=store.findSession( ctx, 
                request.getParameter("id" ));
  -   s.setState( org.apache.tomcat.core.ServerSession.STATE_EXPIRED );
  +   if (s != null ) {
  +        s.setState( org.apache.tomcat.core.ServerSession.STATE_EXPIRED );
   %>
  +<h4> Session invalidated successfully</h4>
  +<%        
  +   } else
  +%>
  +
  +<h4> Session not found , already invalidated </h4>
   
   </body>
   </html>
  
  
  

Mime
View raw message