// maybe more efficient because we don't build Patterns any time
//String[] params = msg.getParamNames();
// The Session ID list option param
OptionsParam options = Model.getSingleton().getOptionsParam();
HttpSessionsParam sessionOptions =
(HttpSessionsParam) options.getParamSet(HttpSessionsParam.class);
// Loop on all possible
// session id variables (looking all along the url)
// -----------------------------------------------------
// We've to rebuild every time the patterns because
// the user could change options during the session
// so we have to be sure that we search for the
// session ids that have really been selected (or added)
// -----------------------------------------------------
for (String sessionid : sessionOptions.getDefaultTokensEnabled()) {
pattern = Pattern.compile("(\\Q" + sessionid + "\\E)=[^\\&]+", Pattern.CASE_INSENSITIVE);
matcher = pattern.matcher(uri);
if (matcher.find()) {
// Get the overall sessionvar=value pattern