public static String removeSessionId ( String sessionId , String page ) { String regexp = ";?jsessionid=" + Pattern . quote ( sessionId ) ; return page . replaceAll ( regexp , "" ) ; }
Removes the jsessionid that may have been added to a URI on a java application server .