// JP opened flex table

Click to See Complete Forum and Search --> : Problems with SessionId


vasgaddam
June 1st, 2000, 12:05 PM
Hi friends! I got a problem with sessionId. I have a login servlet, in which I am creating a sessionObj. and I am checking whether the user is authorized or not.. if he is authorized .. then I have to redirect him to a "different" page..
In that "different" page am getting a sessionId other than from my loginServlet's sessiodId. I dont know the reason??? Can any boyd help me??
Sreeni

Monika
June 3rd, 2000, 03:32 AM
When the user is authenticated, instead of calling an HTML page ,
generate it from the servlet.
PrintWriter pw = response.getWriter();
response.setContentType("text/html");
pw.println("<HTML>");
pw.flush();
pw.println("<HEAD>);
pw.println("<SCRIPT LANGUAGE=\"JavaSript\" >");
pw.flush();
pw.println("");
pw.flush();
pw.println("</SCRIPT>");
.
.
.
pw.println("</HTML>");
pw.close();
You wil have to use LiveConnect i.e Use JavaScript to connect servlets with the applet.
The book you can refer to is JavaScript The Definitive Guide--BY Oreilly
Hope this helps,
Monika.

vasgaddam
June 5th, 2000, 10:06 AM
Hi Monika! Thanks for ur suggestion. But I already fixed the problem.
Once again thanks for ur helping hand!

Sreeni

Monika
June 6th, 2000, 02:50 AM
You must rate the responses to encourage others
Bye
Monika

June 6th, 2000, 03:01 AM
The problem is in the HttpSession.getSession(Boolean session) method. This method creates a new session when a value true is passed and return an existing session when a boolean false in given as argu. Check it.

//JP added flex table