hi all, I have also encountered the same problem. I am using a login.jsp page, where the user has to enter his login id and password, then while submitting , it calls the servlet class to validate the login and then the servlet sends the response to a new jsp page.
In the servlet, i am storing some data in the session. In each jsp, i am getting the session data and after validating, displaying the particular page, based on the data. but, when retreiving the session data, it gives null. i have used response.sendRedirect() to send the response to jsp and session.getAttribute("xVar") to get the session data. and also i have tested using getRequestDispatcher() and application object, but still the issue exist. I had put this issue in JDC forum,jguru forum and javaranch forum, but i couldn't get proper response and answer. I am really wondering, of the fact, i am not getting answers from java , jsp guru's... Is it really, tomcat doesnot support session. The same code working fine using Resin 1.2.5. But when porting to tomcat, it gives such an issue. Can any one please come forward , to conclude this issue. Thanks in advance, Murugan -----Original Message----- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 10:01 PM To: Tomcat Users List Subject: Check Session is valid & response.sendRedirect not working Hi, I am developing a webapplication with tomcat4.0.4 and apache 2.0.39, I want the user to login on first page, and then check if the session is valid or not in each jsp, and servlet. So what is the best way to do it?? i am using jsp code code as below, but seems it that response.sendRedirect("http://localhost/maps/pages/index.jsp"); does not work. AS400 value = (AS400)session.getAttribute("as400"); System.out.println("value of as400 change env " + value); if (value == null) { System.out.println("there is no as400 so response.sednRedirect"); response.sendRedirect("http://localhost/maps/pages/index.jsp"); System.out.println("i am not able to redirec"); } this code works on JRun, Blazix, Websphere, Weblogic so what is the problem Ashish __________________________________________________ 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>