• 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

context in server.xml and sessions

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I'm confused about sessions and contexts and ssl
for the following reason:
I have 3 web apps: sharedWebApp, customerWebApp and
administratorWebApp (for example).
The sharedWebApp is used by both customers and administrators, it contains no secured pages.
Both the customer and admin webapps require login and pages are served over ssl.
In my server.xml, I define 3 contexts,
the sharedApp is the 'default context' defined as follows:
<Context path="" docBase="/path/sharedApp/web"/>
and
<Context path="/customer" docBase="/path/customerApp/web"/>
<Context path="/administrator" docBase="/path/administratorApp/web"/>
Now, this is the confusing part:
When I start tomcat and go directly to
http://localhost:8080/customer I go to customerApp index.jsp, on ssl as expected. index is a login page,
I can log in, browse about and everything is cool.
When I start tomcat and go to http://localhost:8080 I go to the sharedApp index.jsp as expected. this index page has a link,
<a href="/customer"> which goes to the customerApp index page as expected (after checking certificates etc) I can login to the customerApp as normal, but when I try browse around I get 'thrown out'. This is because a session attribute I set upon successful login, is no longer there when I try to go to another page??? It's like there is another session started or something
Sorry for being long winded,. not sure how to explain exactly whats happening.
Anyway, thanks for any comments
Joel
Hope this is the right group to post to...
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic