One thing I notice is that you are using setAttribute but getValue. You
should either use setAttribute and getAttribute or setValue and getValue.
However, since the latter are deprecated, I suggest you use the former.
Hope this helps.
--
Martin Cooper
Tumbleweed Communications
----- Original Message -----
From: "Jim King" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 2:03 PM
Subject: session problem (3rd post)
> Hi everyone
> This is the third time I send this question with no answers.
> Please help...
>
>
> I have the following code:
>
> This is the main page
> // if login successfully
> session.invalidate(); // invalidate previous session
> session =3D request.getSession(true); // create session
> session.setAttribute("loginName", loginName); // put the login ID
> session.setMaxInactiveInterval(900);
> On the secondPage.jsp I have:
> <%
> if (session.getValue("loginName")==null)
> response.sendRedirect(response.encodeURL("error.html"));
> %>
>
> If I run this page through tomcat (using 8080 port) It runs fine. And if
> there is no valid session I see the error page.
> i.e. http://localhost:8080/secondPage.jsp
>
> However, if I run it through apache (I am using JservModul)
> http://localhost/secondPage.jsp
> If there is no valid session, I see the content of "secondPage.jsp" and
> below it I see error.jsp.
>
> Any idea why, or how can I fix that.
> Your help is greatly appreciated.
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.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://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
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://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets