|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I read somewhere that it is possible to turn off JSESSIONID generation in the URL for JSP webapps where the user agent matches a particular type. I would like to turn this off for the google bot but can't find any information.
We are running apache+tomcat+struts. I've looked high and low including in the tomcat docs. Any help appreciated! :-) |
|
#2
|
|||
|
|||
|
The Same Issue
We have the same problem, our apache - tomcat server requires jsessionid. We don't pass the jsessionid through the URL to avoid duplicate content.. so the problem is that we have to resort to setting a cookie... search engines can't set cookies so we're screwed. What do we do?
Thanks! |
|
#3
|
|||
|
|||
|
see the code below for jsessionid issue for google bot
package net.jforum.context; import net.jforum.util.preferences.ConfigKeys; /** * @author Marc Wick * @version $Id: JForumContext.java,v 1.4 2006/09/09 21:32:37 rafaelsteil Exp $ */ public class JForumContext implements ForumContext { private String contextPath; private String servletExtension; private RequestContext request; private ResponseContext response; private boolean isEncodingDisabled; private boolean isBot; public JForumContext(String contextPath, String servletExtension, RequestContext request, ResponseContext response) { this.contextPath = contextPath; this.servletExtension = servletExtension; this.request = request; this.response = response; Boolean isBotObject = (Boolean) request.getAttribute(ConfigKeys.IS_BOT); this.isBot = (isBotObject != null && isBotObject.booleanValue()); this.isEncodingDisabled = isBot; } public JForumContext(String contextPath, String servletExtension, RequestContext request, ResponseContext response, boolean isEncodingDisabled) { this.contextPath = contextPath; this.servletExtension = servletExtension; this.request = request; this.response = response; this.isEncodingDisabled = isEncodingDisabled; Boolean isBotObject = (Boolean) request.getAttribute(ConfigKeys.IS_BOT); this.isBot = (isBotObject != null && isBotObject.booleanValue()); } public boolean isBot() { return isBot; } public String encodeURL(String url) { return this.encodeURL(url, servletExtension); } public String encodeURL(String url, String extension) { String ucomplete = contextPath + url + extension; if (isEncodingDisabled()) { return ucomplete; } return response.encodeURL(ucomplete); } public boolean isEncodingDisabled() { return this.isEncodingDisabled; } public RequestContext getRequest() { return request; } public ResponseContext getResponse() { return response; } } thanks schoolspedia |
![]() |
| Viewing: SEO Chat Forums > Search Engine Strategies > Search Engine Spiders > Turn off JSESSIONID for google bots |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|