You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/11/18 03:01:02 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request SessionInterceptor.java
craigmcc 00/11/17 18:01:02
Modified: src/etc Tag: tomcat_32 server.xml
src/share/org/apache/tomcat/request Tag: tomcat_32
SessionInterceptor.java
Log:
Add a configuration option so that you can suppress the use of cookies
for session maintenance. If selected, Tomcat will *only* support URL
rewriting for this purpose.
NOTE: This setting is global to all web applications installed in a
single instance of Tomcat.
Revision Changes Path
No revision
No revision
1.29.2.10 +5 -2 jakarta-tomcat/src/etc/server.xml
Index: server.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
retrieving revision 1.29.2.9
retrieving revision 1.29.2.10
diff -u -r1.29.2.9 -r1.29.2.10
--- server.xml 2000/11/18 00:09:42 1.29.2.9
+++ server.xml 2000/11/18 02:01:01 1.29.2.10
@@ -126,10 +126,13 @@
<!-- Request processing -->
<!-- Session interceptor will extract the session id from cookies and
- deal with URL rewriting ( by fixing the URL )
+ deal with URL rewriting ( by fixing the URL ). If you wish to
+ suppress the use of cookies for session identifiers, change the
+ "noCookies" attribute to "true"
-->
<RequestInterceptor
- className="org.apache.tomcat.request.SessionInterceptor" />
+ className="org.apache.tomcat.request.SessionInterceptor"
+ noCookies="false" />
<!-- Find the container ( context and prefix/extension map )
for a request.
No revision
No revision
1.24.2.4 +7 -1 jakarta-tomcat/src/share/org/apache/tomcat/request/SessionInterceptor.java
Index: SessionInterceptor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SessionInterceptor.java,v
retrieving revision 1.24.2.3
retrieving revision 1.24.2.4
diff -u -r1.24.2.3 -r1.24.2.4
--- SessionInterceptor.java 2000/11/18 01:33:59 1.24.2.3
+++ SessionInterceptor.java 2000/11/18 02:01:02 1.24.2.4
@@ -84,6 +84,7 @@
// GS, separates the session id from the jvm route
static final char SESSIONID_ROUTE_SEP = '.';
ContextManager cm;
+ boolean noCookies = false;
public SessionInterceptor() {
}
@@ -92,6 +93,10 @@
this.cm=cm;
}
+ public void setNoCookies(boolean noCookies) {
+ this.noCookies = noCookies;
+ }
+
/** Extract the session id from the request.
* SessionInterceptor will have to be called _before_ mapper,
* to avoid coding session stuff inside the mapper.
@@ -131,7 +136,8 @@
if( debug>0 ) cm.log("Before Body " + reqSessionId );
if( reqSessionId==null)
return 0;
-
+ if (noCookies)
+ return 0;
// GS, set the path attribute to the cookie. This way
// multiple session cookies can be used, one for each