• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet Context

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
reply
    Bookmark Topic Watch Topic
  • New Topic