tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <dev_subscripti...@yahoo.com>
Subject Re: Web spiders - disabling jsessionid
Date Sun, 03 Dec 2006 17:38:54 GMT
Or simply leave out the cookies attribute in your Context, this defaults to cookies = "true"
anyway. 


>>No option seems to match the need:
>>true -- uses URL-rewriting if the browser does not support cookies.  this is
>>exactly the problem, as spiders don't use cookies.

No.

Googlebot and other bots do use cookies. If you want to test this, turn on the Cookies logging
attribute on in your AccessLogValve Settings.

To use AccessLogValve simply uncomment it in your server.xml and set the pattern to your own
*custom pattern* . 
In your custom pattern specify %{Cookie}c

For example like this:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
 pattern="%H  &quot;%{User-Agent}i&quot;%{Cookie}c" 
 prefix="localhost_access_log." resolveHosts="false" suffix=".txt" />

Stop and re-start Tomcat instance so that the above logging is activated. 

Wait a few days for bots to crawl, when you see Googlebot or Yahoo Slurp , you'll see the
Cookies they use, it will appear in the log entries for those bots. 

If you want to set additional logging parameters in your AccessLogValve or want to see what
the parameters mean here are more details:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html


>>false --- uses only URL-rewriting.
>>Nowhere there an option to disable URL-rewriting totally.
>>Perhaps you're confused with Resin-- which offers an option to solve this
>>problem.

No , I'm using Tomcat 5.5. And I've omitted the cookies attribute of Context in my Tomcat
settings. 

And Googlebot or any other bot is accessing the URLs just fine (that is without the jsessionid
). 

When I look in the server access logs, jsessionid is *not being appended* at the end of the
URL, for Googlebot or other bots.


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message