Session tracking - url rewriting - servlet

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top