Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Double login for Servlets and JSPs

 
andreas krohn
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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 ]
 
ben munoz
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
Mario Rendon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic