victori_ provided this information on IRC and I just wanted to share it with
everyone else. Googlebot and others dont use cookies. This means when
they visit your site it adds ;jsessionid=code to the end of all your urls
they visit. When they re-visit it, they get a different code, consider that
a different url with the same content and punish you. So, for the web
crawling bots, its very important to get rid of this (Perhaps its
worthwhile to check this code in to the code base).
Heres what you do in your Application:
@Override
protected WebResponse newWebResponse(final HttpServletResponse servletRe
sponse) {
return CleanWebResponse.getNew(this, servletResponse);
}
Here's the CleanWebResponse class:
public class CleanWebResponse {
public static WebResponse getNew(final Application app, final
HttpServletResponse servletResponse) {
return app.getRequestCycleSettings().getBufferResponse() ? new
Buffered(servletResponse) : new Unbuffered(
servletResponse);
}
static class Buffered extends BufferedWebResponse {
public Buffered(final HttpServletResponse httpServletResponse) {
super(httpServletResponse);
}
@Override
public CharSequence encodeURL(final CharSequence url) {
return url;
}
}
static class Unbuffered extends WebResponse {
public Unbuffered(final HttpServletResponse httpServletResponse) {
super(httpServletResponse);
}
@Override
public CharSequence encodeURL(final CharSequence url) {
return url;
}
}
}
Note, I haven't tested this myself yet but I plan to tonight. Hope this was
helpful.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]