tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sarika Inamdar " <sinam...@cisco.com>
Subject RE: Behaviour of JSP with tomcat 4.1.24
Date Thu, 07 Aug 2003 09:08:43 GMT
Hi,

Thanks for the clarifications.

In server.xml, I put in the following configuration :

<Manager className="org.apache.catalina.session.PersistentManager"
              debug="0"
              saveOnRestart="false"
              maxActiveSessions="-1"
              minIdleSwap="-1"
              maxIdleSwap="-1"
              maxIdleBackup="-1">
                <Store
className="org.apache.catalina.session.FileStore"/>
          </Manager>

Its given that 
"To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
and minIdleBackup all to -1, saveOnRestart to false, then restart 
Catalina."

With the above configuration also, am unable to get the desired
behaviour ie, the index.jsp is not prompting for password.

Is there any other configuration I need to do ? Please help me on this.

Thanks,
Sarika


> -----Original Message-----
> From: Mike Curwen [mailto:gb_dev@gb-im.com] 
> Sent: Wednesday, August 06, 2003 7:36 PM
> To: 'Tomcat Users List'; sinamdar@cisco.com
> Subject: RE: Behaviour of JSP with tomcat 4.1.24
> 
> 
> 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:sinamdar@cisco.com]
> > Sent: Wednesday, August 06, 2003 12:16 AM
> > To: tomcat-user@jakarta.apache.org
> > 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: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 
> 


Mime
View raw message