[opencms-dev] OpenCms 6 JSESSIONID cookie
Pere Torrodellas
ptorrodellas at fihoca.com
Fri Aug 19 09:11:06 CEST 2005
Hello Jason, thanks for your reply.
Yes, my understanding is that the session is managed by Tomcat, but the fact
that for the "bad" folder the cookie is not sent, and Tomcat doesn't know
about VFS folders, made me suspect that OpenCms does something about it.
The "good" and "bad" folders have de same pages in two different languages
and use the same set of templates in a module... the only difference that
I'm aware of is the "locale" property, which we use in templates and JSPs to
detect the language. Maybe OpenCms doesn't like the "ca" (the official
locale for Catalan) in the "bad" folder?
All pages in both folders that include the charset parm use "UTF-8", and we
do set <%@ page session="false" %>, but it's the same in both cases because
it's in the templates.
I can't imagine why the setting of a cookie can influence the encoding, but
the fact is that as soon as it's set with one of the pages in the "good"
folder, it's exchanged with the server for every page, even for the "bad"
ones, and the encoding starts to work as expected. Maybe it's just a
coincidence with the true reason?
I'm really puzzled, and hope that someone can offer an idea about what's
going on there...
Pere
----- Original Message -----
From: "Jason Trump" <jason.trump at brulant.com>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Thursday, August 18, 2005 3:18 PM
Subject: RE: [opencms-dev] OpenCms 6 JSESSIONID cookie
Hi Pere,
The JSESSIONID is set by the servlet/JSP container (probably tomcat for
you?), not by opencms. You are correct in that it identifies the
session for subsequent requests from the client.
Unfortunately, I don't know how the setting of the session cookie could
affect character encoding. Here are a few guesses: Are documents in
that folder using a different template than other documents? For
example, maybe you have a JSP template somewhere that is explicitly
setting encoding like
<%@ page contentType="text/html; charset=FOOBAR" %>
Or, do you have any page directives that disable sessions in your JSPs,
like
<%@ page session="false" %>
though I don't think that this should prevent the session cookie from
being set. Perhaps somebody else on the list has a better idea? What
type of pages are in your 'bad' folder -- JSPs, XML content...?
-jason
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-
> bounces at opencms.org] On Behalf Of Pere Torrodellas
> Sent: Thursday, August 18, 2005 7:22 AM
> To: OpenCms
> Subject: [opencms-dev] OpenCms 6 JSESSIONID cookie
>
> Hello,
>
> I am debugging a strange character encoding problem in our OpenCms
> application, and so far the only difference I can see between correct
and
> incorrect encoding is the fact that OpenCms has sent or not a cookie:
>
> Set-Cookie: JSESSIONID=B50B9243698545E3CB3BEF9EF4F2AB39; Path=/socweb
>
> I assume that this is the cookie that identifyes the session, but
> strangely
> enough, OpenCms doesn't send it if the pages come from a particular
> folder.
>
> After this cookie has been set, the accented vowels entered in forms
are
> encodede OK regardless of the page or folder, but not before. By the
way,
> everything in the application (as far as I'm aware) uses UTF-8.
>
> I can't see the difference in properties, etc, between the folder that
> does
> trigger the cookie and the folder that doesn't. Can someone please
explain
> when and when not does OpenCms send this cookie?
>
> And, how can this influence the character encoding in the navigator?
>
> Thanks for any hint,
>
> Pere
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list