*
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
Author

Double login for Servlets and JSPs

andreas krohn
Greenhorn

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.
Thanks
/Andreas
[ August 07, 2002: Message edited by: andreas krohn ]
ben munoz
Greenhorn

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.
-Ben
Mario Rendon
Greenhorn

Joined: Jul 11, 2002
Posts: 24
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
 
 
subject: Double login for Servlets and JSPs
 
Similar Threads
Servlet cannot access bean/Servlet Not found
Include Servlet Problem
J2EE and Windows 98?
J2EE & JSP
jsp cant call bean in websphere