tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Session Config => Tracking Mode not working
Date Tue, 18 Nov 2014 22:51:53 GMT
2014-11-19 0:53 GMT+03:00 Konstantin Kolinko <knst.kolinko@gmail.com>:
> 2014-11-19 0:21 GMT+03:00 Stephen McCants <stephen.mccants@hcs.us.com>:
>> Hello Konstantin Kolinko,
>>
>> I fixed my dumb web.xml schema declaration.  Thanks for pointing that out.
>>
>> I also added the COOKIE tracking mode to the example servlet and it worked there
(the URL encoded link did not contain the JSESSIONID).
>>
>> So, next I turned on logEffectiveWebXml="true" and verified that the effective web.xml
for both of my wars contains:
>>
>>   <session-config>
>>     <session-timeout>30</session-timeout>
>>     <cookie-config>
>>     </cookie-config>
>>     <tracking-mode>COOKIE</tracking-mode>
>>   </session-config>
>>
>> But the first time I hit the web app, I'm still getting JSESSIONID in the URL.
>>
>> Then I turned on Strict Compliance to wring out any other errors in my web.xml that
might be causing the problem.   It found some problems in the Tag
>> Library tld files and fixed those, but that had no effect on JSESSIONID in the URL.
 I have no further errors in Catalina log or any other logs files.
>>
>> At this point, I'm not sure what else I should try to debug the problem.
>>
>> Any suggestions would be appreciated.
>>
>
> a) Run with a debugger
> https://wiki.apache.org/tomcat/FAQ/Developing#Debugging
>
> Possible points:
> org.apache.catalina.connector.Response.encodeURL()
> org.apache.catalina.connector.Response.encodeRedirectURL()
> org.apache.catalina.connector.CoyoteAdapter.service()

Also:
org.apache.catalina.session.StandardSession.getId().

It is the actual Id that is being printed as jsessionid there. It
shall be read using that method. If debugging is hard,  adding some
logging with some stacktraces and recompiling can help.


> b) Simplify your web application
> until it becomes a simple example that can be reproduced by someone else.
>
> c)
>> But the first time I hit the web app
>
> Is that "first time" response actually served by your web app, or by
> some other (e.g. ROOT)?
>
> Best regards,
> Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message