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:


  



  


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]



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:



 



 

 



 


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: 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]



Re: Force URL encoding

2007-09-11 Thread Michael Dehmlow

Thanks, I appreciate the info. As you said just a test. I purged cookies on
both ends and disabled cookies on the browser and the server. I have a
session filter which ensures a session is created:
HttpSession session=((HttpServletRequest)request).getSession(true);
 if (session.isNew())
 {
chain.doFilter(request,response);
System.out.println( "a new session");
 }
 else
 {
 chain.doFilter(request,response);
 }

The new session println() is called every time(even with the hack). 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(



Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Michael,
> 
> Michael Dehmlow wrote:
>> '<%=response.encodeURL("test/") %>' 
> 
> This should work.
> 
>> '<%="test;jsessionid="+request.getSession().getId() %>'
> 
> Don't do this; find out what the problem is and fix that. I realize this
> is only a test, but it's good to debug it before you replicate a hack
> everywhere.
> 
>> 
>> 
>> 
>> While the session is not stored in a cookie
> 
> Have you verified that no cookie exchange is occurring? If you have a
> cookie left over from a previous run-through, Tomcat might be using that
> for session identification and therefore leaving the ";jsessionid=..."
> off of encoded URLs. I wouldn't be surprised if the TC code is very
> tolerant of this kind of abuse, rather than simply saying "okay, cookies
> are disabled; we'll completely ignore them".
> 
>> 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.
> 
> If your session does not exist, then encodeURL isn't going to change
> anything. Make sure that the session exists; I'm guessing that the JSP
> page directive session="true" ensures that?
> 
> Try purging your cookies for the test site and see if that fixes anything.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFG5ax69CaO5/Lv0PARAvfLAJ4i5SqR4k4B3pXnPutXWI8XG00RkQCfacbx
> VOq1VVtIZP4/jTxztVwPtzU=
> =CYVf
> -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#a12616711
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:




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]



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]



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]