if (request.isRequestedSessionIdFromURL()) {
// This is not optimal, but as this is not very common, it
// shouldn't matter
- redirectPath = redirectPath + ";jsessionid="
+ redirectPath = redirectPath + ";" + Globals.SESSION_PARAMETER_NAME + "="
+ request.getRequestedSessionId();
}
if (query != null) {
String file = url.getFile();
if ((file == null) || !file.startsWith(contextPath))
return (false);
- if( file.indexOf(";jsessionid=" + session.getIdInternal()) >= 0 )
+ String tok = ";" + Globals.SESSION_PARAMETER_NAME + "=" + session.getIdInternal();
+ if( file.indexOf(tok, contextPath.length()) >= 0 )
return (false);
}
}
StringBuffer sb = new StringBuffer(path);
if( sb.length() > 0 ) { // jsessionid can't be first.
- sb.append(";jsessionid=");
+ sb.append(";");
+ sb.append(Globals.SESSION_PARAMETER_NAME);
+ sb.append("=");
sb.append(sessionId);
}
sb.append(anchor);
import org.apache.catalina.Container;
import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleListener;
String requestedSessionId = request.getRequestedSessionId();
if ((requestedSessionId != null) &&
request.isRequestedSessionIdFromURL()) {
- file.append(";jsessionid=");
+ file.append(";");
+ file.append(Globals.SESSION_PARAMETER_NAME);
+ file.append("=");
file.append(requestedSessionId);
}
String queryString = request.getQueryString();