• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Double login for Servlets and JSPs

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is one of those questions that you know should be easy but still you dont get anywhere, so I hope you can help...
I have a servlet and some JSPs, all with the same security-constraint in web.xml. Logging in to the servlet seperatly works just fine and logging in to the JSPs seperatly works just fine as well.
One JSP is calling my servlet, and even if I am logged in fine on the JSP I am once again asked to login on the servlet and double login is not really a feature I am looking for.
Do the JSPs and servlets share the same session somehow or do I have to implement that?
I am using FORM based authentication on JBoss 3.0.1/Jetty.
Thanks
/Andreas
[ August 07, 2002: Message edited by: andreas krohn ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the JSP and the servlet part of the same web-app? If they are, they should share the same session variables.
-Ben
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also you should check that in the jumps to and from servlets & JSP you are ussing
request.getContextPath()
since if you change from
http://localhost
to
http://127.0.0.1
os someting similar you would be prompted for autentication again
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic