G
gonas
I'm new to session tracking and i have problem with the following
code.
I have a servet which connects to another servlet, rewriting the URL
servlet 1 (/servlet/serv) has code
if(sess == null)
{
sess = generateSessionID();
//the function generates ID perfectly
out.println("new sess ID - "+sess);
}
else
{
out.println("old sess ID - "+sess);
}
out.println("<FORM ACTION =\"/servlet/servl/"+sess+"\" METHOD
= POST>");
out.println("<INPUT TYPE = SUBMIT VALUE =\"CLICK\">");
out.println("</FORM>");
servlet 2(/servlet/servl) has code
if(sess == null)
{
out.println("<a href=\"/servlet/serv\">go back</a>");
}
else
{
out.println("servl sess ID - "+sess);
}
when i execute the servlet i get the following errors
HTTP Status 404 - /servlet/servl/c837cd%3A1005202e54d%3A-8000
--------------------------------------------------------------------------------
type Status report
message /servlet/servl/c837cd%3A1005202e54d%3A-8000
description The requested resource
(/servlet/servl/c837cd%3A1005202e54d%3A-8000) is not available.
code.
I have a servet which connects to another servlet, rewriting the URL
servlet 1 (/servlet/serv) has code
if(sess == null)
{
sess = generateSessionID();
//the function generates ID perfectly
out.println("new sess ID - "+sess);
}
else
{
out.println("old sess ID - "+sess);
}
out.println("<FORM ACTION =\"/servlet/servl/"+sess+"\" METHOD
= POST>");
out.println("<INPUT TYPE = SUBMIT VALUE =\"CLICK\">");
out.println("</FORM>");
servlet 2(/servlet/servl) has code
if(sess == null)
{
out.println("<a href=\"/servlet/serv\">go back</a>");
}
else
{
out.println("servl sess ID - "+sess);
}
when i execute the servlet i get the following errors
HTTP Status 404 - /servlet/servl/c837cd%3A1005202e54d%3A-8000
--------------------------------------------------------------------------------
type Status report
message /servlet/servl/c837cd%3A1005202e54d%3A-8000
description The requested resource
(/servlet/servl/c837cd%3A1005202e54d%3A-8000) is not available.