You are experiencing valid behaviour, as Tomcat 4x will persist sessions
to disk.  This is supposed to allow sessions to survive between server
restarts ( a desirable situation in most cases) When you clear out the
work directory, the sessions stored on disk are cleared.  
 
There is a way to turn off the persistent sessions... check for any
<Manager tags in server.xml

> -----Original Message-----
> From: Sarika Inamdar [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 06, 2003 12:16 AM
> To: [EMAIL PROTECTED]
> Subject: Behaviour of JSP with tomcat 4.1.24
> 
> 
> Hi All,
> 
> When we start tomcat and connect to the server, the index.jsp 
> page is displayed . When I key in a password, it validates 
> the password and goes to the next jsp page(login.jsp)
> 
> I stop tomcat and restart it again. Now when I connect to the 
> server, the index.jsp directly takes me to the login.jsp page 
> without asking for password. This should not happen. 
> Everytime the tomcat is stopped 'n started we should get the 
> password validation.
> 
> But when I stop tomcat and clear the contents of 
> $CATALINA_HOME/work/StandAlone/, When tomcat is started, it 
> displays the index.jsp which asks for password validation.
> 
> This behaviour was not seen in tomcat 3.2.3.
> 
> Please let me know if am missing something.  Am attaching the 
> code snippet of index.jsp and validateLogin.jsp which is 
> called from index.jsp
> 
> Thanks in Advance for the help,
> Sarika
> 
> 
> Here is code snippet of index.jsp :
> 
> %@ include file="header.jsp" %>
> <%@ include file="validateLogin.jsp" %>
> 
> <%@ page import="com.cisco.das.core.*" %>
> 
> <b>Home</b>
> <br>Host: <%= InetAddress.getLocalHost() %>
> <br>Current time: <%= new Date() %>
> 
> <%
>         try {
>           String s = DAS.status();
>           ByteArrayInputStream bs = new 
> ByteArrayInputStream(s.getBytes());
> 
>           Properties prop = new Properties();
>           prop.load(bs);
> 
>           out.println("<br>Status: Running");
> 
>           out.println("<br>CNS name: " + prop.getProperty("name"));
>           out.println("<br>CNS group: " + 
> prop.getProperty("group", ""));
> 
>           out.println("<br>Start time: " +
>                       new
> Date(Long.parseLong(prop.getProperty("startTime"))
> ));
>           out.println("<br>Version: " + 
> prop.getProperty("package.version"));
>           out.println("<br>Build date: " + 
> prop.getProperty("package.date"));
> 
>           %>
>           <br>
>           <br>
>           <form method="post" action="stop.jsp">
>             <input type="submit" value="Stop process">
>           </form>
>           <%
>         } catch (Exception e) {
>          out.println("<input type=\"hidden\" name=\"debug\" 
> value=\"" + e.toStr
> ing() + "\">");
> 
>           String configdir = System.getProperty("user.dir") + 
> "/config";
>           File pidFile = new File(configdir, "pid");
>           if (pidFile.exists()) {
>             out.println("<br>Status: Initializing...");
>             %>
>             <br>
>             <form method="post" action="stop.jsp">
>               <input type="submit" value="Stop Process">
>             </form>
>             <%
>           }
>           else {
>             out.println("<br>Status: Stopped");
>             %>
>             <br>
>             <form method="post" action="start.jsp">
>               <input type="submit" value="Start process">
>             </form>
>             <%
>           }
>         }
> %>
> 
> <%@ include file="footer.jsp" %>
> 
> Snippet of  validateLogin.jsp :
> 
> <%
>     String value = (String)session.getValue("das.login");
>     if (value == null) {
> %>
> Login password:
> <form method="post" action="login.jsp?url=<%= 
> request.getServletPath() %>" name= "login">
>     <input type="password" size="20" name="password">
>     <input type="submit" value="submit">
> </form>
> <%
>         return;
>     }
> %>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to