I have never personally tried this, so no guarantees...
BUT...
If you use
Tomcat 4.0.x (and perhaps 3.2.x, but I can't check right now), in server.xml, find the context element for the particular web application you are talking about. If you've been using Tomcat's built-in 'thanks very much' behaviour of loading anything under the webapps directory automatically, you'll have to add one here, because you want to use a non-default value.
anyways.. there is an an attribute in the context element called 'cookie'. Set it to false, and the context should *always* use URL rewriting. ie: It will force request.encodeURL to encode the URL with the jsessionid
string.
Let us know how it works.