Tim, thanks a lot for the solution.    It turns out I can do the same thing
programmatically by calling
HttpSession.setMaxInactiveInterval(numOfSeconds)


--Richard

"Chen, Gin" wrote:

> Session Timeouts are set in the web.xml file. So it is set per project not
> on the server level. This makes sense because 2 applications that run on the
> same server may not want to have the same timeouts.
> To change it for your application use:
>
>         <session-config>
>                 <session-timeout>timevalue in minutes(ex.
> 240)</session-timeout>
>         </session-config>
>
> -Tim
>
> -----Original Message-----
> From: Richard Lui [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 23, 2002 8:20 PM
> To: [EMAIL PROTECTED]
> Subject: bean session timeout
>
> Please disregard my previous question, it actually works as expected.
>
> However, I have another question.   It appears that even I set a Java bean
> scope to be
> 'session' in a jsp file, it will still time out after about 30 minutes.
> For example,
> if I define a bean like this in my jsp file:
>     <jsp:useBean id="cdstore" scope="session" class="sample.CDStore" />
> Then on submit, a servlet would do the following:
>       HttpSession session = request.getSession();
>       CDCatalog c = (CDCatalog)session.getAttribute("cdstore");
>
> The variable c returns null after about 30 minutes.   Is this a configurable
> parameter
> in Tomcat?    Has anyone experienced something like this?     Thanks.
>
> --Richard
>
> Richard Lui wrote:
>
> > HI,
> >
> > I'm using Apache-Tomcat and I'm having problem getting the cookie from the
> client.
> > In a html form, click 'Go' trigger the following:
> > <form action="/sample/WizardStart.jsp" method=GET>
> > <table>
> >    <tr><td>
> >    <input type=submit value="Go">
> >    <input type=hidden name="company" value="ABC Company">
> >    </td></tr>
> > </table>
> > </form>
> >
> > Inside WizardStart.jsp, I put in some code to check what's stored in
> client cookie:
> >
> > <%
> >      Cookie  ckobj_a[] = request.getCookies();
> >       int    num_ckobj = 0;
> >       String reqValue = null;
> >
> >       if (ckobj_a != null)
> >       {
> >          num_ckobj = ckobj_a.length;
> >       }
> >       for (int i = 0; i < num_ckobj; ++i)
> >       {
> >          Cookie   ckobj = ckobj_a[i];
> > System.out.println ("Checking cookie: " + ckobj.getName());
> >       }
> > %>
> >
> > I got "Checking cookie: JSESSIONID" in the tomcat console.   I expect to
> see the
> > client's cookies, what's going on here?   Thanks.
> >
> > --Richard
> >
> >
> ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to