Hi everyone
I am sending this email again because I did not get any reply. I hope the
email got its way out to you guys!..

I have a session problem.

I have the following code:

This is the main page
// if login successfully
session = 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 i.e.
http://localhost:8080/secondPage.jsp) It runs fine.
And if there is no valid session I see the error page.

However, if I run it through apache
http://localhost/secondPage.jsp
If there is no valid session, I see the content of "secondPage.jsp" and
then thr following lines:
"HTTP/1.1 200 OK Date: Wed, 14 Feb 2001 20:45:09 GMT Server: Apache/1.3.12
(Win32) ApacheJServ/1.1 Last-Modified: Wed, 07 Feb 2001 20:18:16 GMT ETag:
"0-1014-3a81ad88" Accept-Ranges: bytes Content-Length: 4116 Keep-Alive:
timeout=15, max=99 Connection: Keep-Alive Content-Type: text/html"

and below these lines I see error.jsp.

Any idea why, or how can I fix that.
Your help is greatly appreciated.

Jim

_________________________________________________________________
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

Reply via email to