Hi,
I am developing an web application using tomcat4.0.4
and apache 2.0.39 on win2000
I want the user the login on the first page, so once
the user logs in i create a session for the user,
now in other jsp in applciation i have a header.jsp
this jsp checks if the session is active or experied,
if experied redirect to signin page.
this jsp checks for the session, but some how
response.sendRedirect("index.jsp"); does not work
I have a signoff.jsp which simply invalidates the
session,
now the problem is , some how when i include the
header.jsp in my other jsp, it seems that it does not
redirect to the indexpage if the session is not valid,
and alows the other code to work,so i get null pointer
exception,
but if i only header.jsp it works.
why is that...is there any other way to check if the
session is alive or not,???
or any other way to redirect the response???
how do i set session experience time ??? it is 30min
now.
the code for header.jsp is given below
please help
Ashish
which looks some thing like this
<%@ page language="java" session="true"
import="com.ibm.as400.access.*" buffer="16kb"
autoFlush="true" isThreadSafe="true"
isErrorPage="false" %>
<%
try{
if (session == null)
{
response.sendRedirect("index.jsp?error=2");
}
else
{
AS400 value = (AS400)session.getAttribute("as400");
System.out.println("value of as400 in header.jsp " +
value);
if (value == null)
{
System.out.println("there is no as400 so
response.sednRedirect");
response.sendRedirect("http://pfizer-maps/maps/pages/index.jsp?error=2");
out.println("i am not able to use
response.sendRedirect");
}
}
}
catch(Exception exc)
{
System.out.print("no as400 value in header.jsp");
response.sendRedirect("index.jsp?error=2");
}
%>
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>