[opencms-dev] Cookies in OpenCMS again ...
Alexander Kandzior
alex at opencms.org
Wed May 14 09:27:01 CEST 2003
Chase,
maybe this is a bug. Consider writing a bug report in this case and
provise some code (seems you already have that) which exhibits the wrong
behaviour. As this is obviously somthing important, we will try to fix
it ASAP if we have a reproducible bug report.
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
> -----Original Message-----
> From: opencms-dev-admin at opencms.org
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of Urich, Chase
> Sent: Tuesday, May 13, 2003 11:11 PM
> To: opencms-dev at opencms.org
> Subject: RE: [opencms-dev] Cookies in OpenCMS again ...
>
>
> Thank you for the information, I'll expand my search ...
> Has anyone else encountered this, and if not, how are you
> utilizing cookies?
>
> Chase Urich
>
> -----Original Message-----
> From: Tim Howland [mailto:thowland at organic.com]
> Sent: Tuesday, May 13, 2003 4:00 PM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Cookies in OpenCMS again ...
>
>
> I had a similar problem; it looks like the cookie isn't
> getting set in the correct context when in opencms (I was
> using the response tag library). I proved it out by examining
> the actual http headers as they flew by. My code worked fine
> outside of the cms. I can send you a quick and dirty perl
> proxy server that echoes out the headers + the bodies of page
> requests as they fly by, if interested.
>
> I came up with a workaround of using javascript to set the
> cookie at the destination page- inelegant, but functional.
>
> I'd suggest digging into the page context stuff- it looks
> like that's where the response header is coming from.
>
> Good luck,
>
> Tim
>
>
> On Tue, 13 May 2003, Urich, Chase wrote:
>
> > I've proven that my cookie code works by running it in a different
> > webapp. Is there a reason that it doesn't work in OpenCMS?
> I have the
> > path set to "/" ... Is there something OpenCMS specific that I'm
> > missing? My code has been included below for reference:
> >
> > <!-- cookie.jsp (page 1) -->
> > <%@ page import="javax.servlet.http.*" %>
> > <%
> > Cookie cookie = new Cookie ("cookieName", "cookieValue");
> > cookie.setPath("/");
> > cookie.setMaxAge(365 * 24 * 60 * 60);
> > response.addCookie(cookie);
> > %>
> > <html><head></head><body>
> > Cookie Set? ... hopefully.<br />
> > <a href='cookie2.jsp'>Cookie 2 test</a>
> > </body>
> > </html>
> >
> > <!-- cookie2.jsp (page 2) -->
> > <%@ page import="java.net.*"%>
> > <HTML>
> > <HEAD>
> > </HEAD>
> > <BODY><pre><%
> > String cookieName = "Username";
> > Cookie cookies[] = request.getCookies ();
> > for (int i = 0; i < cookies.length; i++) {
> > out.println(cookies[i].getName() + " -> " +
> cookies[i].getValue());
> > }
> > %></pre>
> > <a href='cookie.jsp'>Cookie test</a>
> > </BODY>
> > </HTML>
> >
> > Chase Urich
> > Web Programmer
> > LeTourneau University
> _______________________________________________
> > 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
> >
>
>
>
> --
> Tim Howland
> Engineering
> Organic
> 212-822-6742
> _______________________________________________
> 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