JVM per Context

2008-09-10 Thread Michael Dehmlow

I have multiple contexts that are defined for a given host in my server.xml
each context I would like to start up in its own jvm, for dll and
enviornment variable reasons.
Here's an example of my server.xml:

Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

 Context path=/eclipse/A docBase=/eclipsev1
!--I want to load dllv1.dll--
!--I want to set the env var 'slot' to ''A'--
Parameter name=com.dev.myParm value=eclipse/A
override=false/
 /Context

 Context path=/eclipse/B docBase=/eclipsev2
!--I want to load dllv2.dll--
!--I want to set the env var 'slot' to 'B'--
Parameter name=com.dev.myParm value=eclipse/B
override=false/
 /Context
/host

I've read documentation for tomcat 3.4 that details the use of ajp for
communication to achieve this but can't find anything about jvms docs.

Thanks for any help,
Mike
 
-- 
View this message in context: 
http://www.nabble.com/JVM-per-Context-tp19414891p19414891.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JVM per Context

2008-09-10 Thread Michael Dehmlow

Thanks, my version of tomcat 5.5.26. My mistake I was looking at tomcat 3.3
documentation:
http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html
http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html .

Yes defining contexts in the Server.xml is discouraged but I'm doing it
anyway. ;)

For those in a similar situation I'm going down the path of defining an
engine per context:

Engine name=engA defaultHost=localhost jvmRoute=jvmA
  Host name=localhost appBase=webapps
   unpackWARs=true
   xmlValidation=false xmlNamespaceAware=false
Context path=/eclipse/A docBase=/slot_A 
cookies='false'
Parameter name=com.dev.myParm value=/eclipse/A 
override=true/
/Context
  /Host
/Engine

Using jvmRoute the idea is to use the clustering mechanism of tomcat to give
me multiple jvms

This being only my theory I can only hope someone can either call me an
idiot or give me a few pointers in short order.

I will post my findings as I find them.
Thanks, 
Mike
-- 
View this message in context: 
http://www.nabble.com/JVM-per-Context-tp19414891p19420413.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Force URL encoding

2007-09-11 Thread Michael Dehmlow

I  ran through the source a couple of times encode url will return the
parameter in many cases there is a bunch of logic to determine if the
session is supposed to be appended,   but nothing is apparent as to why I've
been going through and trying to get a false in the logic that determines if
the URL should be encoded but I got to the end with no revalations.
I thought something might be amis due to the fact that I'm running in
calisto eclipse but putting the war into an actual tomcat enviornment
resulted in the same behavior. Scouring google I find problems relating to
https (which I'm not using) on older versions (which I'm not using).
I'll try the cookies enabled angle thanks. 




Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Michael,
 
 Michael Dehmlow wrote:
 The new session println() is called every time(even with the hack).
 
 So, when you make a request with a URL including the jsessionid
 parameter, it still gets ignored? This is one page, on one server,
 right? Weird.
 
 which
 says to me that tc is ignoring the url encoded sessionid. I've tried
 every
 variation I can think of can someone point me in the direction of the
 tomcats source 8(
 
 Try going back to cookies=true (well.. remove the cookies=false) and
 try disabling cookies on your browser. Do your URLs get encoded by
 Tomcat, then?
 
 They certainly do when I turn off cookies, and I haven't done anything
 weird with my configuration at all.
 
 - -chris
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFG5q5P9CaO5/Lv0PARApBXAJ44ka0IjpRfOULvhqOqaKvKc4b1bgCbB7zp
 SUeNUZesUuEWeEftswe1WZU=
 =w0BL
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12618863
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Force URL encoding

2007-09-10 Thread Michael Dehmlow

Hello I'm looking for a way to force url session tracking regardless of
whether the user has  cookies enabled. My thoughts right now are to create a
session filter that deletes the cookie on the way out the door. if this
seems like a good idea who should I go about deleting the the cookie.
-- 
View this message in context: 
http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12594298
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Force URL encoding

2007-09-10 Thread Michael Dehmlow

The caviot to my question was that I wanted to force session rewritting for
only one servlet. But I now see the flaw in this if another servlet in the
same context sets a cookie (jsessionid) that cookie will now be set for the
all other servlets as well. The solution is to use the cookies=false in the
context file. And simply encode all URLs.

Michael Dehmlow wrote:
 
 Hello I'm looking for a way to force url session tracking regardless of
 whether the user has  cookies enabled. My thoughts right now are to create
 a session filter that deletes the cookie on the way out the door. if this
 seems like a good idea who should I go about deleting the the cookie.
 

-- 
View this message in context: 
http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12596041
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Force URL encoding

2007-09-10 Thread Michael Dehmlow

Alright now I have another problem which is baffling me:

I have:
%@ page session=true %
'%=response.encodeURL(test/) %' 
in a jsp page.
the result is always 'test/'
so i tried forcing:
'%=test;jsessionid=+request.getSession().getId() %'
And the result looks like i expect it too

But when I make another request tomcat the session I've appended.

I have a session filter which:
In my context.xml file i have:

?xml version=1.0 encoding=UTF-8 ?
Context cookies=false/Context

While the session is not stored in a cookie it appears that tomcat is not
finding the session i specify. which I think has something to do with the
fact that encodeURL does not work.

-- 
View this message in context: 
http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12599331
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]