tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hanusch, Hartwig" <Hartwig.Hanu...@fja.com>
Subject AW: Apache/Tomcat 3.2.1 session error - help!
Date Mon, 18 Dec 2000 15:57:14 GMT
Hi Henri,

indeed am i (trying to) use ajp13 with jk_mod but the error is reproducible
with jserv to.

Here are the code snipples 
->

public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
{
	HttpSession currentSession = req.getSession(true);

	if (!(sessions_.contains(currentSession)))
	{
		System.out.println("in DoGET: found new session");
		sessions_.add(currentSession);
		currentSession.setAttribute("phase", "A");
		System.out.println("session: "+ currentSession);
	}

	if(req.getParameter("user")!= null)
		currentSession.setAttribute("user",
req.getParameter("user"));


	if (everything OK)
	{
		out.println("<form method=\"POST\" action=" +
redirectToMyself_ + " target=\"_self\">");
		out.println("<input type=\"hidden\" name=\"UserTyp\"
value=\"Gast\"><input type=\"hidden\" name=\"T1\"value=\"GastReg\">");
		out.println("<input type=\"hidden\" name=\"T1\"
value=\"gastReg\">");
		out.println("submit ....");
		
	}
}


public void doPost (HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
{
	System.out.println("in DoPost");
	System.out.println("req.getSession ->" + req.getSession(false));
}

so that gives two different session objects (), and req.getSession(false)
shouldnt return a new session!

Thanks for your help :)

Cheers Hartwig




Mime
View raw message