• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Context

 
Gregory Bonk
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does the serlvet context appear to change when I access the same server with a different URL? If I refer to a server like http://127.0.0.1/index.jsp I will have a different servlet context from http://localhost/index.jsp when they are clearly accessing the same machine. Session attributes are different.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same machine can have many application thus many ServletContext.
However I think both 127.0.0.1/index and localhost/index should belong the default application.
Can you give more details?
 
Mario Rendon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i have had that problem before ..

the session context is based on the Server "the browser sees"
sine the session is saved on a cookie called jsessionid this cookie is set to act on the context of the Server name .

that's why the context in localhost and yourmachinename.com are different..

also if you try autentications ( that is also a cookie ) are based on the same schema

Maybe it could be possible; if needed, to pass along the session ID to have the same context.

Grettings .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic