Using JSP with Tomcat 4, I've noticed that using the response.sendRedirect() method, or jsp:forward tag to another directory on the same server is loosing all the session variables.

Dan Waldner

Yep. Well, yes to the latter, not the former. I'm not certain why the response.sendRedirect kills the session variables, but I've noticed this as well. Use this in your jsp code to redirect:


This preserves the session variable.