You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vincent Delhommois <vi...@voila.fr> on 2006/02/24 08:01:30 UTC

2 sessions different instead of one wished !!!

Hello, I use JAAS and filter (security-filter) of Tomcat with the j_security_check.
So here is the context :
- the user try to access to the ActionServlet?action=welcome
As the user is not authenticates, it loads the login.jsp page :
- login.jsp submit the username and password through the j_security_check.
- My custom LoginModule is called to authenticates with JAAS (commit() method is called ssuccessfullly if login and password are OK)
- Then it should call the ActionServlet?action=welcome. As i describe a filter in the web.xml, before that call, it execute my UserFilter code.
Here is the problem :
   In my UserFilter, I get a session objet (internal id = 150 for example)
To terminate the UserFilter, I do a : chain.doFilter(request, response);
   In my ActionServlet, I get a session objet (internal id = 999 for example) !!! It's not the same session !!!!!!!!
I don't know why and what's wrong and what I do not understand.
Thanks 






> Message du 24/02/06 à 06h03
> De : "Sathish Sathyan" 
> A : "Tomcat Users List" 
> Copie à : 
> Objet : Re: context path ignored in Context.xml
> 
> 
> Hi Robert,
> 
> To counter such a problem, try giving the absolute path in the 'appBase'
> parameter of the HostName tag in server.xml.
> 
> My server.xml is something like this:
> 
> > maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
> enableLookups="true" redirectPort="8443"
> acceptCount="10" debug="0" connectionTimeout="20000"
> disableUploadTimeout="true" />
> 
> 
> > debug="0" resourceName="UserDatabase" />
> 
> 
> 
> 
> 
> 
> After making these changes, the error didn't appear for me.
> 
> Thanks,
> Sathish
> 
> On Thu, 2006-02-23 at 08:29 -0500, Robert Taylor wrote:
> > Greetings,
> > 
> > I'm using Tomcat 5.5.15 on Win2k in development.
> > I start Tomcat through a target in my Ant build and pass it a server.xml 
> > file.
> > 
> > My web app is deployed to a directory named "webapp" (the docbase) and 
> > contains a /META-INF/context.xml file which has a context path, "/test".
> > 
> > When I start tomcat and attempt to access my web app using the context 
> > path of /test, I get a strange 400 error.
> > 
> > 
> > HTTP/1.x 400 No Host matches server name localhost
> > 
> > 
> > 
> > 
> > When I access the webapp using /webapp as the context path, tomcat 
> > serves up the content.
> > 
> > Therefore, it appears that Tomcat is ignoring the context path I have 
> > defined and using the docbase directory in name by default.
> > 
> > I have been pouring over the online docs for a couple days and haven't 
> > been able to figure this one out.
> > 
> > Any help would be appreciated.
> > 
> > /robert
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> 
> 
> This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
> Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
> prohibited and may be unlawful.
> 
> Visit us at http://www.cognizant.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
>