public static final boolean USE_INSTANCE_MANAGER_FOR_TAGS =
Boolean.valueOf(System.getProperty("org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS", "false")).booleanValue();
+ /**
+ * The name of the path parameter used to pass the session identifier
+ * back and forth with the client.
+ */
+ public static final String SESSION_PARAMETER_NAME = "jsessionid";
+
}
package org.apache.jasper.tagplugins.jstl;
+import org.apache.jasper.Constants;
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
public static String stripSession(String url) {
StringBuffer u = new StringBuffer(url);
int sessionStart;
- while ((sessionStart = u.toString().indexOf(";jsessionid=")) != -1) {
+ while ((sessionStart = u.toString().indexOf(";" + Constants.SESSION_PARAMETER_NAME + "=")) != -1) {
int sessionEnd = u.toString().indexOf(";", sessionStart + 1);
if (sessionEnd == -1)
sessionEnd = u.toString().indexOf("?", sessionStart + 1);