Hi, any suggestion for this problem?
Thanks, best regards Il 25/05/2011 10.34, Diego Ruotolo ha scritto: > Hi, > > this is my first post to this list. Maybe it's a post more related to > the developers list, if so please tell me so and I will send it to that > list. > > Working with my company's webapp, I noticed a strange behaviour: > sometimes http session, managed through JSESSIONID cookie, is lost. We > use Tomcat 5.5.27 on Windows. > Debugging Tomcat classes using the Eclipse debugger, I noticed that this > happens because cookies are not correctly parsed, in fact: > > * Cookies (class org.apache.tomcat.util.http.Cookies) are instantiated > when a new Request (class org.apache.coyote.Request) is created. > * Constructor of class Cookies accept a MimeHeaders as argument. > * Cookies are parsed using the method getCookieCount(): this method > sets the boolean variable "unprocessed" to false and call the method > processCookies() for processing cookis from the header (that is the > argument of the Cookies class constructor) > > Everything works fine, but sometimes it happens that even if cookies are > correctly inserted in the request header (I can see it!) and > "unprocessed" variable of class Cookies is set to false (== cookies > parsed) , the cookies are NOT parsed: in fact the ServerCookie array is > empty! > It seems that is a time-related issue: IMHO the problem is that > sometimes cookies are parsed BEFORE header is parsed. > > Hope I've been clear... > > Is this a known problem? Any suggestions? Maybe there is some > "configuration tricks" I can use to avoid this problem? > > Thanks in advice, > > best regards -- Ing. Diego Ruotolo Software developer NoemaLife S.p.A. Via Gobetti, 52 40129 Bologna - ITALY T +39 051 70.98.249 F +39 051 41.93.900 www.noemalife.com