Sampath,
I need to start a JSP session with a given Id, like "http://localhost/home.jsp?session=123456789", but not like "http://localhost/home.jsp;jsessionid=123456789?<query_string>".
If you know PHP, see below code:
<?php
session_id($_GET['session']);
session_start();
// rest of the code
?>
I want to do the same using JSP too. I need this because the client is not a browser. It just sends send HTTP requests and expects a reply. The client includes "?session=<session_id>" to it's request, where session_id is generated in the very first HTTP request. It's similar to a web browser with cookies disabled.
But the client cannot send a request like "http://localhost/home.jsp;jsessionid=123456789?<query_string>".
When I tried "session.setId(request.getParameter("session"));" I got an exception, "The method setId(String) is undefined for the type HttpSession"
Looking forward to a favorable reply.
Regards.
Amil.