I used Apache's mod_rewrite and some rewriting rules, like this:
# This 'works' except that cookies are set by tomcat under /v31 (JSESSIONID) NameVirtualHost www.mysite.test:80 <VirtualHost www.mysite.test:80> ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/mysite/v31 ServerName www.mysite.test ErrorLog logs/www.mysite.test-error_log CustomLog logs/www.mysite.test-access_log commonWithTime RewriteEngine on RewriteLog logs/rewrite.log RewriteLogLevel 9 RewriteRule ^/$ /index.jsp RewriteRule ^/(.*).jsp /v31/$1.jsp [L,PT] RewriteRule ^/servlet/(.*) /v31/servlet/$1 [L,PT] RewriteRule ^/images/(.*) /v31/images/$1 [L] RewriteRule ^/style/(.*) /v31/style/$1 [L] RewriteRule ^/tag30/(.*) /v31/tag30/$1 [L] RewriteRule ^/pdf/(.*) /v31/pdf/$1 [L] JkMount /servlet/* wlb JkMount /*.jsp wlb </VirtualHost> But the browser sees "/" as the context, not /v31, and the cookie belongs to /v31 and thus the browser doesn't send it on requests 2-n, and therefore you really don't have sesion tracking. Kind of useless ;-) Tim -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of matador Sent: Tuesday, February 07, 2006 9:00 PM To: users@tomcat.apache.org Subject: RE: newbie:access tomcat virtual host via apache "Tim Lucia" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > A few weeks ago, I asked a similar question which went unanswered. > Basically, I want to have the user request www.somewhere.com but have > Apache forward that to tomcatserver:8009/someNonRootContext/ so I can > have different versions, w/o exposing the context to the user. > Rewriting works, except that cookies set in Tomcat are relative to > /someNonRootContext and so the browser does not send them back on the > next request. > > Tim ah, thats what i want to do but it sounds like thats not possible. can you explain how you set up the url rewriting thing? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]