<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2>It's easy to maintain sessions in an OpenCms
'application'. </FONT></SPAN><SPAN class=376581106-08062006><FONT
face=Arial color=#0000ff size=2>In sample OpenCms code and in most people's use
of it, JSPs are written with the page directive attribute session=false, just to
avoid the overheads associated with session maintenance. But it's quite
possible to write an OpenCms-hosted JSP with session=true, and (as you'll know)
you would have to do this in order for sessions to be maintained. The
session maintenance mechanism would be the usual jsessionid stuff, and as usual
you could stash your application's session state in the JSP session scope by
your usual preferred means.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2>In other words, statefulness/statelessness is only
associated with the Guest user in that in the absence of a session, the user is
always taken initially to be the Guest user. Of course, your own code
could then decide to 'log in' the current CmsRequestContext as another user, but
if sessions weren't being maintained that would be a one-off
thing.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2>On the subject of SEO, I asked Google about how it treated
jsessionids, because for such an important topic it didn't seem to be covered
very well anywhere. I've copied the exchange below (I'm sure Google won't
mind). I guess it doesn't tell you anything you don't already know, and it
still leaves me thinking that Google doesn't like statefully-browsed web
sites... I'd be interested to know what you end up
doing.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2>======================================</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006>
<P><FONT face=Arial size=2>Hi Jon,</FONT></P>
<P><FONT face=Arial size=2>Thank you for your note. <SPAN
class=376581106-08062006>[...] </SPAN>Please be advised that in order for
Googlebot to be able to crawl your site effectively, your server should not
require cookies for HTTP requests with a User-Agent header that includes the
substring "Googlebot" anywhere in the header value.</FONT></P>
<P><FONT face=Arial size=2>Additionally, as you may already know, session IDs
can cause problems for our robots. Please disable session IDs for Googlebot so
that our robots may crawl your site more efficiently.</FONT></P>
<P><FONT face=Arial size=2>We appreciate your taking the time to write to
us.</FONT></P>
<P><FONT face=Arial size=2>Regards,</FONT></P>
<P><FONT face=Arial size=2>The Google Team</FONT></P>
<P><FONT face=Arial size=2>Original Message Follows:</FONT></P>
<P><FONT face=Arial size=2>------------------------</FONT></P>
<P><FONT face=Arial><FONT size=2>From: <SPAN
class=376581106-08062006>[me]</SPAN></FONT></FONT></P>
<P><FONT face=Arial size=2>Subject: Does Googlebot honor per-session cookies
when crawling?</FONT></P>
<P><FONT face=Arial size=2>Date: Sat, 21 Jan 2006 04:31:49 -0000</FONT></P>
<P><FONT face=Arial size=2>I'm writing a Tomcat-based web application for a
CMS-driven web site. </FONT></P>
<P><FONT face=Arial size=2>Tomcat can maintain sessions using cookies or by
rewriting URLs (to contain a JSESSIONID parameter), and it will adopt its
behaviour on the fly depending on the capabilities of the user agent visiting
it.</FONT></P>
<P><FONT face=Arial size=2>Does Googlebot honor (i.e. accept and re-present)
cookies when crawling a site? If so, that's great; if not, then Google search
results for my site will contain an ugly JSESSIONID parameter.</FONT></P>
<P><FONT face=Arial size=2>Thanks in advance, and keep up the good
work.</FONT></P>
<P><FONT face=Arial size=2>Jon</FONT></P></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=376581106-08062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Chris
Stephens<BR><B>Sent:</B> 08 June 2006 06:35<BR><B>To:</B>
opencms-dev@opencms.org<BR><B>Subject:</B> [opencms-dev] Guests and
sessions<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>Hi
folks,</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>I hope this question
does not repeat earlier ones: I have looked and could not find the same question
on the list previously...</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>I understand that
OpenCms treats every visitor not signed in as Guest. So logging out in fact
entails logging in as Guest.</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>I also notice that
browsing an OpenCms website (e.g. the demo pages) as Guest does not set any
cookies.</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>This is great news
for SEO: no need to artificially get rid of the JSESSIONID (or similar) part of
the URL!</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>But if the Guest
activity is not stateful then does that mean I cannot set session variables per
Guest user? This is a major problem for us because we need to track a Source ID
(from a banner ad) through our site until the visitor starts an application for
one of our products. At that point and thereafter the Source ID is dealt with by
the form framework.</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial size=2>Is anyone doing
something similar? Can anyone provide some suggestions?</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336212705-08062006><FONT face=Arial
size=2>Chris</FONT></SPAN></DIV></BODY></HTML>