ok this is where it starts to get bizzare...
http://www.greenlightproductions.co.uk/servlets/SessionExample This now works (as in it is keeping the same session ID ) but it is showing the wrong servlets folder (as in for wrong virtual host and showing the tomcatid of that virtual host) Since below is a servlet for the host in question http://www.greenlightproductions.co.uk/servlets/GreenLight but it shows servlets setup for pro.org.uk http://www.greenlightproductions.co.uk/servlets/ContactMe http://www.pro.org.uk/servlets/ContactMe in server.xml i have setup unique engines. <Engine name="Catalina3" defaultHost="www.greenlightproductions.co.uk" debug="0" jvmRoute="worker2"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_" suffix=".log" timestamp="true"/> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/> <DefaultContext reloadable="true" debug="4"/> <Host name="www.greenlightproductions.co.uk" debug="0" appBase="/apache_sites/servlets/" unpackWARs="true" autoDeploy="true"> <Context path="/servlets" docBase="greenlight" debug="0" reloadable="true"/> <parameter> <name>driverClassName</name> <value>org.gjt.mm.mysql.Driver</value> </parameter> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="green_log." suffix=".txt" pattern="common" resolveHosts="true"/> </Host> </Engine> <Engine name="Catalina2" defaultHost="www.pro.org.uk" debug="0" jvmRoute="worker1"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_" suffix=".log" timestamp="true"/> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/> <DefaultContext reloadable="true" debug="4"/> <Host name="www.pro.org.uk" debug="0" appBase="/apache_sites/servlets/" unpackWARs="true" autoDeploy="true"> <Context path="/vahidservlets" docBase="vservlets" debug="0" reloadable="true"/> <Context path="/servlets" docBase="vservlets" debug="0" reloadable="true"/> <parameter> <name>driverClassName</name> <value>org.gjt.mm.mysql.Driver</value> </parameter> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="pro_log." suffix=".txt" pattern="common" resolveHosts="true"/> </Host> </Engine> workers.properties worker.list=worker1,worker2,worker3 # Definition for local worker using AJP 1.3 # #worker.foo.type=ajp13 #worker.foo.host=www.pro.org.uk #worker.foo.port=8009 #worker.foo.cachesize=20 [uri:www.pro.org.uk/servlets/*] worker.worker1.tomcatId=worker1 #worker.foo=ajp13:www.pro.org.uk:8009 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.reclycle_timeout=300 [uri:www.greenlightproductions.co.uk/servlets/*] worker.worker2.tomcatId=worker2 #worker.foo=ajp13:www.pro.org.uk:8009 worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8009 worker.worker2.lbfactor=50 worker.worker2.cachesize=10 worker.worker2.cache_timeout=600 worker.worker2.socket_keepalive=1 worker.worker2.reclycle_timeout=300 virtual host for greenlight <IfModule mod_jk.c> JkLogFile /var/log/apache2/mod_jk.log JkMount /servlets/* worker2 </IfModule> Virtual host for pro.org.uk <IfModule mod_jk.c> JkLogFile /var/log/apache2/mod_jk.log JkMount /servlets/* worker1 JkMount /vahidservlets/* worker1 </IfModule> Why is tomcat doing this ? This now proves this has nothing to do with cookies since it can keep the same session ID for a servlet that it is not supposed to show lol Thanks vahid On 3/21/06, Reinhard Moosauer <[EMAIL PROTECTED]> wrote: > > Hi, > > please check your browser. I think you have cookies disabled for any > reason. > (or cookies are disabled in your tomcat app) > > yould check with ethereal or try using cookie-less mode with > response.encodeURL(hyperlink) > > hope this helps > > R. > > Am Freitag, 17. März 2006 13:35 schrieb Vahid Hedayati: > > Hi All. > > > > Have been looking for a few days now for a fix for this one issue that I > > just cannot get around.. > > > > Basically > > > > If I run > > http://www.greenlightproductions.co.uk/servlets/SessionExample > > > > The session ID keeps changing if you refresh the page > > > > (same goes for all other servlet code I been using you login once logged > in > > session info lost as in new session ID assigned) > > > > > > but if I go to port 8180 it works perfect > > http://www.greenlightproductions.co.uk:8180/servlets/SessionExample > > > > the session ID remains the same no matter how much i refresh. > > > > > > I have been looking all over google for an answer for this and most of > it > > is to do with load balancing tomcat and getting same session ID :( > > > > I am sure others have hit this issue before and it must be a tom cat > config > > issue (well for the apache listener) > > > > here is some of my config. > > > > ####################################################################### > > /etc/apache2/mods-enabled/jk2.load > > LoadModule jk2_module /usr/lib/apache2/modules/mod_jk2.so > > > > ####################################################################### > > /etc/apache2/mods-enabled/jk2.conf > > # To enable mod_jk2, customize workers2.properties* from > > # /usr/share/doc/libapache2-mod-jk2/examples and copy it to > > # /etc/apache2/workers2.properties. Then uncomment the following line: > > JkSet config.file /etc/apache2/workers2.properties > > # Where to put jk logs > > #JkLogFile /var/log/apache2/mod_jk.log > > > > # Set the jk log level [debug/error/info] > > #JkLogLevel info > > > > # Select the log format > > #JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " > > > > # JkOptions indicate to send SSL KEY SIZE, > > #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories > > > > # JkRequestLogFormat set the request format > > #JkRequestLogFormat "%w %V %T" > > > > # Globally deny access to the WEB-INF directory > > <LocationMatch '.*WEB-INF.*'> > > AllowOverride None > > deny from all > > </LocationMatch> > > > > ####################################################################### > > /etc/apache2/workers2.properties > > # > > # This is the minimal JK2 connector configuration file. > > # > > > > [logger] > > info=Native logger > > level=ERROR > > > > [config:] > > file=${serverRoot}/workers2.properties > > debug=0 > > debugEnv=0 > > > > [uriMap:] > > info=Maps the requests. > > debug=0 > > > > [shm:] > > info=Scoreboard. Required for reconfiguration and status with > multiprocess > > servers > > file=anonymous > > debug=0 > > > > [workerEnv:] > > info=Global server options > > timing=0 > > debug=0 > > > > [lb:lb] > > info=Default load balancer. > > debug=0 > > > > [channel.socket:localhost:8009] > > info=Ajp13 forwarding over socket > > debug=0 > > #tomcatId=tomcat1 > > tomcatId=localhost:8009 > > keepalive=1 > > > > [uri:/admin] > > info=Tomcat HTML based administration web application. > > debug=0 > > > > [uri:/manager] > > info=A scriptable management web application for the Tomcat Web Server. > > debug=0 > > > > [uri:/jsp-examples] > > info=JSP 2.0 Examples. > > debug=0 > > > > [uri:/servlets-examples] > > tomcatId = jvmRoute > > info=Servlet 2.4 Examples. > > debug=0 > > > > [uri:/*.jsp] > > info=JSP Extension mapping. > > debug=0 > > > > [uri:/servlets/*] > > worker=ajp13:localhost:8009 > > > > ####################################################################### > > snippets of /etc/tomcat5/server.xml > > <Server port="8005" shutdown="SHUTDOWN" debug="0"> > > <!--apache listne added--> > > <Listener className="org.apache.jk.config.ApacheConfig" > > modJk="/usr/lib/apache2/modules/mod_jk2.so" > > WorkersConfig="/etc/apache2/workers2.properties" /> > > > > <Listener className="org.apache.jk.config.ApacheConfig" > > append="true" forwardAll="false" > > modJk="/usr/lib/apache2/modules/mod_jk2.so" > > WorkersConfig="/etc/apache2/workers2.properties" /> > > > > > > ............... > > <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8180 --> > > <Connector className="org.apache.coyote.tomcat5.CoyoteConnector" > > port="8180" minProcessors="5" maxProcessors="75" > > enableLookups="true" acceptCount="10" debug="0" > > connectionTimeout="20000" useURIValidationHack="false" /> > > ... > > <Host name="www.greenlightproductions.co.uk" debug="0" > > appBase="/xxxx/servlets/" > > unpackWARs="true" autoDeploy="true"> > > <Context path="/servlets" docBase="greenlight" debug="0" > > reloadable="true"/> > > > > <Manager className="org.apache.catalina.session.PersistentManager" > > debug="0" saveOnRestart="true" maxActiveSessions="30" > > minIdleSwap="60" maxIdleSwap="60" maxIdleBackup="60"> > > <Store className="org.apache.catalina.session.FileStore" > > directory="/xxx/xxxx/log/"/> > > <!--<Store className="org.apache.catalina.session.JDBCStore" > driverName=" > > org.gjt.mm.mysql.Driver" > > > connectionURL="jdbc:mysql://localhost/tomcat?user=nnnn&password=xxxxx" > > sessionTable="tomcat$sessions" sessionIdCol="id" sessionDataCol="data" > > sessionValidCol="valid" sessionMaxInactiveCol="maxinact > > ive" sessionLastAccessedCol="lastaccess" checkInterval="60" debug="99" > /> > > --> > > </Manager> > > <parameter> > > <name>driverClassName</name> > > <value>org.gjt.mm.mysql.Driver</value> > > </parameter> > > <Valve className="org.apache.catalina.valves.AccessLogValve" > > directory="logs" prefix="greenlight_log." suffix=".txt" pa > > ttern="common" resolveHosts="true"/> > > </Host> > > > > > > > > > > ####################################################################### > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >