The following filter should remove the jsessionid even if cookie is
disabled by the client, though I haven't tried it with JBoss (my
container is Tomcat 6).
It should be the first filter defined in your web.xml.
public class EncodeUrlFilter implements Filter
{
public void doFilter(
ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException, ServletException
{
HttpServletResponseWrapper wrappedResponse = new
HttpServletResponseWrapper((HttpServletResponse)response)
{
@Override
public String encodeRedirectUrl(final String url) {
return url;
}
@Override
public String encodeRedirectURL(final String url) {
return url;
}
@Override
public String encodeUrl(final String url) {
return url;
}
@Override
public String encodeURL(final String url) {
return url;
}
};
chain.doFilter(request, wrappedResponse);
}
public void destroy(){}
public void init(FilterConfig filterConfig)
throws ServletException{}
}
In my actual code, response is wrapped only when the user-agent is a
search engine bot (that was the requirement).
I still do not recommend doing this, but sometimes requirements does not
change...
Hope this helps,
Iwao
marc wrote on 09.4.2 5:47 AM:
> Levi Hoogenberg <levihoogenb...@...> writes:
>
>>
>> On Wed, Apr 1, 2009 at 12:03 AM, marc
> <[email protected]> wrote:
>> If i turn cookies off, the jsessionid shows up
>> again for all links generated using a stripes:link tag.
>>
>>
>>
>> And you'd like to have these gone as well? You do use the session, right?
>> Then
> the jsessionid parameter is a (very small) price you pay for being able to do
> so
> in the stateless web. Levi
>
> No we're doing a search site and do not need session. We want our URLs as
> clean
> as possible. I know it's not a stripes question but is there a way to turn
> this
> off?
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users