I need to learn how a tomcat server identify different hosts to create unique sessions. Does it do it according to Ip ?
Based on answer to this question, I want to be able to create multiple sessions for single client, on a server which uses simply httpServletRequest.getSession()
to create new sessions. Is possible to give a predefined session Id to a server, so that that server creates that new session bound to that session Id ?
It doesn't do any identification. Each time a request comes in and you ask for a session to be created, it creates one. The generated session ID is sent to the browser in a cookie, and the browser sends back this cookie for all subsequent requests, which allows Tomcat to find the associated session.
I can't really understand what you're trying to achieve. A session doesn't identify a server. It identifies a specific client of a web app. Each client has its own session ID. Assigning a session ID to a server doesn't make much sense to me.