This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic