RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-22 Thread Tim Lucia
You will probably want to set emptySessionPath to true

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
http://marc.theaimsgroup.com/?l=tomcat-userm=114082698006999w=2

Otherwise, the browser will send the cookie for /mywebapp as that is the
context which Tomcat will set JSESSIONID under.

Unless you don't need sessions.

Tim

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 2:21 AM
To: Tomcat Users List
Subject: Re: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

Xin Herbert Wu wrote:
 
 (1) Assume I have a web app called mywebapp.war and I deployed it to the
 jboss server(http1.1 connector listens on port 8080). I can access this
web
 app with the URL http://localhost:8080/mywebapp/index.html (easy for
 development)
 (2) Now I want to add the apache server(assuming on port 80) as the
 front-end to access mywebapp.war with shorter url
 http://localhost:80/index.html (nice for production)


JkMount /mywebapp/* yourworker


RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(.*)$
#You can have Apache serve static content
#for example /mywebapp/images/*
#RewriteCond %{REQUEST_URI} !^/images/.*$
RewriteRule ^/(.*) /mywebapp/$1 [PT]


Regards,
Mladen.


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



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Caldarale, Charles R
 From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
 Subject: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 
 webapp: context path prepend ?
 
 What's the proper way to configure apache and/or mod_jk so 
 that both (1) and (2) are valid ways to access the given webapp?

The easiest way is just remove httpd.  Why do you think you need it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Do you mean I comment out 
Connector port=8080 address=${jboss.bind.address}  ...
Entry in tomcat server.xml?
Basically I want it for a bit convenience in development without using
apache. I could remove if it is only way to do it. 

If I do remove it, do I have to use virtual host if the tomcat container
contains multiple webapps so that each of these webapps can accept request
from different apache servers?

Thanks!

-Xin 

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:19 AM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

 From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
 Subject: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 
 webapp: context path prepend ?
 
 What's the proper way to configure apache and/or mod_jk so 
 that both (1) and (2) are valid ways to access the given webapp?

The easiest way is just remove httpd.  Why do you think you need it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Oh, I do not think so. Public request must come from apache. We run Jboss
cluster and mod_jk is the load balancer. 

For each node in the cluster, there will be several webapps deployed. 
The typical request flow would be apache-1 server is response for
www.web1.com and routes traffic to webapp1.war deployed in the cluster, and 
Apache-2 server is response for www.web2.com and routes traffic to
webapp2.war. For each node in the cluster, webapp1.war and webapp2.war are
both deployed. 

I looked over virtual host in Jboss/Tomcat and it allows me to manipulate
context path, but I am wondering if I can do it on Apache server end. 

-Xin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:59 AM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

 From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
 Subject: RE: apache(v2.0) front-end to 
 jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?
 
 Do you mean I comment out 
 Connector port=8080 address=${jboss.bind.address}  ...
 Entry in tomcat server.xml?

No, you change the port number to 80.  Just eliminate httpd from the
environment - you haven't stated any reason why you think you need it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Caldarale, Charles R
 From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
 Subject: RE: apache(v2.0) front-end to 
 jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?
 
 Oh, I do not think so. Public request must come from apache. 
 We run Jboss cluster and mod_jk is the load balancer. 

O.k., that's a very valid reason.  When you're using mod_jk, the
requests to Tomcat come in through the AJP connector, not the HTTP one.
You should be able to use a filter in the default webapp to forward
requests to the desired context.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Never think about filter forwarding. It definitely should work.
Thanks!!
-Xin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 4:52 PM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

 From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
 Subject: RE: apache(v2.0) front-end to 
 jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?
 
 Oh, I do not think so. Public request must come from apache. 
 We run Jboss cluster and mod_jk is the load balancer. 

O.k., that's a very valid reason.  When you're using mod_jk, the
requests to Tomcat come in through the AJP connector, not the HTTP one.
You should be able to use a filter in the default webapp to forward
requests to the desired context.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Mladen Turk

Xin Herbert Wu wrote:


(1) Assume I have a web app called mywebapp.war and I deployed it to the
jboss server(http1.1 connector listens on port 8080). I can access this web
app with the URL http://localhost:8080/mywebapp/index.html (easy for
development)
(2) Now I want to add the apache server(assuming on port 80) as the
front-end to access mywebapp.war with shorter url
http://localhost:80/index.html (nice for production)



JkMount /mywebapp/* yourworker


RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(.*)$
#You can have Apache serve static content
#for example /mywebapp/images/*
#RewriteCond %{REQUEST_URI} !^/images/.*$
RewriteRule ^/(.*) /mywebapp/$1 [PT]


Regards,
Mladen.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]