File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Double login for Servlets and JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Double login for Servlets and JSPs" Watch "Double login for Servlets and JSPs" New topic

Double login for Servlets and JSPs

andreas krohn

Joined: Nov 19, 2000
Posts: 18
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.
[ August 07, 2002: Message edited by: andreas krohn ]
ben munoz

Joined: Jul 24, 2001
Posts: 5
Are the JSP and the servlet part of the same web-app? If they are, they should share the same session variables.
Mario Rendon

Joined: Jul 11, 2002
Posts: 24
Also you should check that in the jumps to and from servlets & JSP you are ussing
since if you change from
os someting similar you would be prompted for autentication again
I agree. Here's the link:
subject: Double login for Servlets and JSPs
It's not a secret anymore!