Moved to JBoss Web forum.
setting org.apache.catalina.session.ManagerBase.SESSION_ID_ALPHABET should be the way to remove the + - _ that are in the default encoding string.
I set the property JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.session.ManagerBase.SESSION_ID_ALPHABET=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" in the conf file and it seem to work fine but intermittently I get another exception thrown
Exception initializing page context: java.lang.ArrayIndexOutOfBoundsException: 63
Since I wanted only alphanumeric characters i removed the + and - sign reducing the value from 65 to 63 characters. I think i read somewhere else that SESSION_ID_ALPHABET has to be 65 characters in length
you need 64: from 0 to 3F.