[opencms-dev] JSessionID in request

Daniel daoquan at gmail.com
Thu Dec 15 02:57:43 CET 2011


What do you mean by "set it as a request property" ? Didn't you use cookie?
BTW, there is a trap, fmt tag will raise an exception when the request
header "Accept-Language" is empty,

2011/12/14 Thomas Göttlich <guo.tuomi at googlemail.com>

> Hi,
>
> we have a system that frequently queries OpenCMS for content (which is
> delivered as JSON).
> Thus we use java.net.URL, open a connection and read the response from
> OpenCMS.
>
> This works fine but we observed that for each request a new http session
> object is created.
> In order to prevent this, we'd like to reuse the session and thus we
> extract the JSESSIONID from the response header and on subsequent requests
> we set it as a request property.
>
> However, OpenCMS tries to get its own session associated with that
> JSESSIONID and fails, since it is a 33-character string as opposed to the
> 36-character string that is required by CmsUUID (actually the internally
> used UUID).
> We thus get this exception: java.lang.NumberFormatException: UUID has to
> be represented by the standard 36-char representation
>
> I could change the JSESSIONID to be 36-characters long but it still isn't
> a valid UUID (which has to contain dashes).
>
> Does anyone know how we can reuse the same http and OpenCMS sessions for
> internal requests made by our system?
>
> Thanks in advance.
>
> Thomas
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20111215/f8b336cf/attachment.htm>


More information about the opencms-dev mailing list