You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sergiusz Jarczyk <se...@qresc.com> on 2004/10/26 14:08:00 UTC
Session IDs and robots
Hi All
I'm currently working on a large webapp, powered by Struts, and I have a
serious problem with making it SE-friendly. The problem is, I don't know
how to make Struts to not attach session id (i.e. no encodeURL()) the
URL returned to visitor, in case it's a robot (i.e. googlebot). In other
words, how to make Struts to selectively disable sessions. I don't want
to disable session tracking for all visitors, as I need it for the app
logic. Any servlet filters and/or mod_rewrite solutions are not a
choice, as they don't stop Struts from generating links with the session
id attached.
Any ideas?
TIA,
Sergiusz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Session IDs and robots
Posted by Christoph Kutzinski <ku...@gmx.de>.
Hi,
I would subclass LinkTag resp. RewriteTag and let them not append the
session id if the agent-name is somethink like GoogleBot or so.
I already thought about doing something like this to not create
session-id for links to css, jsp, gif files, but I didn't have the time
until now.
HTH
Christoph
Sergiusz Jarczyk wrote:
> Hi All
> I'm currently working on a large webapp, powered by Struts, and I have a
> serious problem with making it SE-friendly. The problem is, I don't know
> how to make Struts to not attach session id (i.e. no encodeURL()) the
> URL returned to visitor, in case it's a robot (i.e. googlebot). In other
> words, how to make Struts to selectively disable sessions. I don't want
> to disable session tracking for all visitors, as I need it for the app
> logic. Any servlet filters and/or mod_rewrite solutions are not a
> choice, as they don't stop Struts from generating links with the session
> id attached.
> Any ideas?
>
> TIA,
> Sergiusz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Session IDs and robots
Posted by Emmanouil Batsis <Em...@eurodyn.com>.
Although others may come up with better answers, on the top of my head
the quickest and maybe clean enough way to deal with this is a servlet
filter that intercepts all requests, looks for the googlebot useragent
and invalidates the HTTP session before passing the request to the
chain. Or something like that :-)
hth,
Manos
Sergiusz Jarczyk wrote:
> Hi All
> I'm currently working on a large webapp, powered by Struts, and I have
> a serious problem with making it SE-friendly. The problem is, I don't
> know how to make Struts to not attach session id (i.e. no encodeURL())
> the URL returned to visitor, in case it's a robot (i.e. googlebot). In
> other words, how to make Struts to selectively disable sessions. I
> don't want to disable session tracking for all visitors, as I need it
> for the app logic. Any servlet filters and/or mod_rewrite solutions
> are not a choice, as they don't stop Struts from generating links with
> the session id attached.
> Any ideas?
>
> TIA,
> Sergiusz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Session IDs and robots
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Theres nothing in Struts that can currently help you.
You could extend the LinkTag and override the calculateURL() method to
include your logic to either include or omit the jsessionid
Niall
----- Original Message -----
From: "Sergiusz Jarczyk" <se...@qresc.com>
To: <us...@struts.apache.org>
Sent: Tuesday, October 26, 2004 1:08 PM
Subject: Session IDs and robots
> Hi All
> I'm currently working on a large webapp, powered by Struts, and I have a
> serious problem with making it SE-friendly. The problem is, I don't know
> how to make Struts to not attach session id (i.e. no encodeURL()) the
> URL returned to visitor, in case it's a robot (i.e. googlebot). In other
> words, how to make Struts to selectively disable sessions. I don't want
> to disable session tracking for all visitors, as I need it for the app
> logic. Any servlet filters and/or mod_rewrite solutions are not a
> choice, as they don't stop Struts from generating links with the session
> id attached.
> Any ideas?
>
> TIA,
> Sergiusz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org