You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Huhn <am...@hslt-online.com> on 2008/12/30 17:13:48 UTC

T5/Jetty: disabling jsessionid?

Hello,

I'm having issues with the way my app is being crawled by search
engines.  A jsessionid parameter is being added to the URL of each
request, making the link obtained by the search engine useless.

I'm running Jetty 6.  I know from perusing the web that this jsessionid
is being added by Jetty, but I don't know how to disable that, other
than writing a ServletFilter
( http://mail-archives.apache.org/mod_mbox/tapestry-users/200606.mbox/%
3C85CE4E3FD2EC2C4E8AAE39916AC1A3830F9BC819@ms07.mse2.exchange.ms%3E ).
This is something I'd rather not get into.  Any suggestions?  Or does
anyone have any working T5 code I could plug in that would take care of
this for me?

Thanks,
Andy


Re: T5/Jetty: disabling jsessionid?

Posted by Adam Zimowski <zi...@gmail.com>.
You wouldn't have to write a filter of your own. There is a very
flexible url filter which you just plug in and configure expression
(perl5 style or wilecard) for filtering (rewriting):

http://tuckey.org/urlrewrite/

-adam

On Tue, Jan 27, 2009 at 3:12 AM, Andy Huhn <am...@hslt-online.com> wrote:
> Hi Lutz,
>
> Somehow I missed your original post...when I went back today to google
> fo
> solutions to this issue again, I found your post to my original
> question!
>
> Thanks so much for this.  That's a really good thought.  I'm not sure at
> this point
> why these pages think they need state, but I'll take a look at it.
>
> If I did want to strip the session id with a filter, do you have any
> pointers where
> I can look for more info?
>
> Thanks,
> Andy
>
>
> On Fri, 2009-01-02 at 15:52 +0100, Lutz Hühnken wrote:
>
>> Andy,
>>
>> you can strip the session id with filter, but you should also check if
>> the pages you want index really need to be stateful. When your servlet
>> container adds a session id, it means it found it necessary to create
>> a session. If you just strip the session id, a new session will be
>> created for every request from a search engine crawler, which is
>> usually not want one wants, especially if you have a lot of pages.
>>
>> Tapestry makes it easy to make your pages stateless, since ASOs are
>> not created before they are used, and you can check for existence
>> before using (and thereby creating) them. That will also solve the
>> session id issue, since for the stateless pages, a session won't even
>> be created. Have you thought about that?
>>
>> hth,
>>
>> Lutz
>>
>>
>> On Tue, Dec 30, 2008 at 5:13 PM, Andy Huhn <am...@hslt-online.com> wrote:
>> > Hello,
>> >
>> > I'm having issues with the way my app is being crawled by search
>> > engines.  A jsessionid parameter is being added to the URL of each
>> > request, making the link obtained by the search engine useless.
>> >
>> > I'm running Jetty 6.  I know from perusing the web that this jsessionid
>> > is being added by Jetty, but I don't know how to disable that, other
>> > than writing a ServletFilter
>> > ( http://mail-archives.apache.org/mod_mbox/tapestry-users/200606.mbox/%
>> > 3C85CE4E3FD2EC2C4E8AAE39916AC1A3830F9BC819@ms07.mse2.exchange.ms%3E ).
>> > This is something I'd rather not get into.  Any suggestions?  Or does
>> > anyone have any working T5 code I could plug in that would take care of
>> > this for me?
>> >
>> > Thanks,
>> > Andy
>> >
>> >
>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5/Jetty: disabling jsessionid?

Posted by Andy Huhn <am...@hslt-online.com>.
Hi Lutz,

Somehow I missed your original post...when I went back today to google
fo
solutions to this issue again, I found your post to my original
question!

Thanks so much for this.  That's a really good thought.  I'm not sure at
this point
why these pages think they need state, but I'll take a look at it.

If I did want to strip the session id with a filter, do you have any
pointers where
I can look for more info?

Thanks,
Andy


On Fri, 2009-01-02 at 15:52 +0100, Lutz Hühnken wrote:

> Andy,
> 
> you can strip the session id with filter, but you should also check if
> the pages you want index really need to be stateful. When your servlet
> container adds a session id, it means it found it necessary to create
> a session. If you just strip the session id, a new session will be
> created for every request from a search engine crawler, which is
> usually not want one wants, especially if you have a lot of pages.
> 
> Tapestry makes it easy to make your pages stateless, since ASOs are
> not created before they are used, and you can check for existence
> before using (and thereby creating) them. That will also solve the
> session id issue, since for the stateless pages, a session won't even
> be created. Have you thought about that?
> 
> hth,
> 
> Lutz
> 
> 
> On Tue, Dec 30, 2008 at 5:13 PM, Andy Huhn <am...@hslt-online.com> wrote:
> > Hello,
> >
> > I'm having issues with the way my app is being crawled by search
> > engines.  A jsessionid parameter is being added to the URL of each
> > request, making the link obtained by the search engine useless.
> >
> > I'm running Jetty 6.  I know from perusing the web that this jsessionid
> > is being added by Jetty, but I don't know how to disable that, other
> > than writing a ServletFilter
> > ( http://mail-archives.apache.org/mod_mbox/tapestry-users/200606.mbox/%
> > 3C85CE4E3FD2EC2C4E8AAE39916AC1A3830F9BC819@ms07.mse2.exchange.ms%3E ).
> > This is something I'd rather not get into.  Any suggestions?  Or does
> > anyone have any working T5 code I could plug in that would take care of
> > this for me?
> >
> > Thanks,
> > Andy
> >
> >
> 
> 
> 

Re: T5/Jetty: disabling jsessionid?

Posted by Lutz Hühnken <lh...@googlemail.com>.
Andy,

you can strip the session id with filter, but you should also check if
the pages you want index really need to be stateful. When your servlet
container adds a session id, it means it found it necessary to create
a session. If you just strip the session id, a new session will be
created for every request from a search engine crawler, which is
usually not want one wants, especially if you have a lot of pages.

Tapestry makes it easy to make your pages stateless, since ASOs are
not created before they are used, and you can check for existence
before using (and thereby creating) them. That will also solve the
session id issue, since for the stateless pages, a session won't even
be created. Have you thought about that?

hth,

Lutz


On Tue, Dec 30, 2008 at 5:13 PM, Andy Huhn <am...@hslt-online.com> wrote:
> Hello,
>
> I'm having issues with the way my app is being crawled by search
> engines.  A jsessionid parameter is being added to the URL of each
> request, making the link obtained by the search engine useless.
>
> I'm running Jetty 6.  I know from perusing the web that this jsessionid
> is being added by Jetty, but I don't know how to disable that, other
> than writing a ServletFilter
> ( http://mail-archives.apache.org/mod_mbox/tapestry-users/200606.mbox/%
> 3C85CE4E3FD2EC2C4E8AAE39916AC1A3830F9BC819@ms07.mse2.exchange.ms%3E ).
> This is something I'd rather not get into.  Any suggestions?  Or does
> anyone have any working T5 code I could plug in that would take care of
> this for me?
>
> Thanks,
> Andy
>
>



-- 
altocon GmbH
http://www.altocon.de/
Software Development, Consulting
Hamburg, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org