Return-Path:
Delivered-To: apmail-tomcat-users-archive@www.apache.org
Received: (qmail 54113 invoked from network); 22 Dec 2010 23:02:57 -0000
Received: from unknown (HELO mail.apache.org) (140.211.11.3)
by 140.211.11.9 with SMTP; 22 Dec 2010 23:02:57 -0000
Received: (qmail 63042 invoked by uid 500); 22 Dec 2010 23:02:49 -0000
Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org
Received: (qmail 62824 invoked by uid 500); 22 Dec 2010 23:02:49 -0000
Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: "Tomcat Users List"
Delivered-To: mailing list users@tomcat.apache.org
Received: (qmail 62815 invoked by uid 99); 22 Dec 2010 23:02:49 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 23:02:49 +0000
X-ASF-Spam-Status: No, hits=0.0 required=10.0
tests=MIME_QP_LONG_LINE,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: local policy)
Received: from [66.219.55.137] (HELO mail.polydyne.com) (66.219.55.137)
by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 23:02:42 +0000
Received: from Unknown [10.1.1.19] by mail.polydyne.com - Websense Email
Security (7.2.0); Wed, 22 Dec 2010 17:04:00 -0600
Received: from POSTOFFICE02.polydyne.com ([::1]) by POSTOFFICE02.polydyne.com
([::1]) with mapi id 14.01.0255.003; Wed, 22 Dec 2010 17:02:12 -0600
From: Jeffrey Janner
To: 'Tomcat Users List'
Subject: RE: httpd/Tomcat load balancing question
Thread-Topic: httpd/Tomcat load balancing question
Thread-Index: AcuiDSY909uOc0vIRf+LdbE1il2EkgAPgauAAAi4xEAAEOmOoAAheC6Q
Date: Wed, 22 Dec 2010 23:02:11 +0000
Message-ID: <7215BA462D00D343B2837F9113F0131F01C939@POSTOFFICE02.polydyne.com>
References: <7215BA462D00D343B2837F9113F0131F01C604@POSTOFFICE02.polydyne.com>
<4D1262EF.3070600@ice-sa.com>
<7215BA462D00D343B2837F9113F0131F01C911@POSTOFFICE02.polydyne.com>
<7215BA462D00D343B2837F9113F0131F01C92B@POSTOFFICE02.polydyne.com>
In-Reply-To:
<7215BA462D00D343B2837F9113F0131F01C92B@POSTOFFICE02.polydyne.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.1.1.27]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-SEF-7853D99-ADF1-478E-8894-213D316B8FFA: 1
X-SEF-Processed: 7_2_0_00493__2010_12_22_17_04_03
X-Virus-Checked: Checked by ClamAV on apache.org
Definitely the culprit. Now, I just have to convince the Dev team that the=
y are, once again, a bunch of idiots.=0D=0A=0D=0AI'm sure it's some framewo=
rk/tool they are using. The question now is, if I can't get them to not us=
e it in this case, is there some way to modify httpd to strip the ;jsession=
id stuff, or pass it on to the Tomcat server if it's there=3F That is, ign=
ore the local feed if there is a sticky session id embedded in the URL=3F=0D=
=0A=0D=0AJeff=0D=0A=0D=0A> -----Original Message-----=0D=0A> From: Jeffrey =
Janner [mailto:Jeffrey.Janner@PolyDyne.com]=0D=0A> Sent: Wednesday, Decembe=
r 22, 2010 4:50 PM=0D=0A> To: 'Tomcat Users List'=0D=0A> Subject: RE: httpd=
/Tomcat load balancing question=0D=0A>=20=0D=0A> In the specific case I men=
tion below, this is the source from the jsp:=0D=0A> value=3D"/static/images/ico=
ns/favicon.ico"/>" />=0D=0A>=20=0D=0A> I'm not a jsp programmer, but I'm be=
tting it has something to do with=0D=0A> the encapsulation.=0D=0A=
> Jeff=0D=0A>=20=0D=0A> > -----Original Message-----=0D=0A> > From: Jeffrey=
Janner [mailto:Jeffrey.Janner@PolyDyne.com]=0D=0A> > Sent: Wednesday, Dece=
mber 22, 2010 4:40 PM=0D=0A> > To: 'Tomcat Users List'; 'Tomcat Users List'=0D=
=0A> > Subject: RE: httpd/Tomcat load balancing question=0D=0A> >=0D=0A> > =
Thanks, that was what I was thinking.=0D=0A> > Since the only JSP I have ac=
cess to is the welcome-file, I'm not sure=0D=0A> I=0D=0A> > can verify.=0D=0A=
> >=0D=0A> > Q: I would think the getContextPath would be desirable, in cas=
e we=0D=0A> > change the war-file name, etc., but I wouldn't think that wou=
ld cause=0D=0A> > the jsessionID string to get appended to the end of the p=
ath. That=0D=0A> is,=0D=0A> > they are coming out as=0D=0A> >=0D=0A> "/Por=
tal/static/images/icons/favicon.ico;jsessionid=3DB4E3E4AA3D79B8877A0=0D=0A>=
> 9CFCC32827D09.tomcat1".=0D=0A> >=0D=0A> > Jeff=0D=0A> >=0D=0A> > > -----=
Original Message-----=0D=0A> > > From: Andr=E9 Warnier [mailto:aw@ice-sa.co=
m]=0D=0A> > > Sent: Wednesday, December 22, 2010 2:43 PM=0D=0A> > > To: Tom=
cat Users List=0D=0A> > > Subject: Re: httpd/Tomcat load balancing question=0D=
=0A> > >=0D=0A> > > Hi.=0D=0A> > >=0D=0A> > > Not knowing anything about JS=
P per se, I would nevertheless guess=0D=0A> > that=0D=0A> > > the links are=0D=
=0A> > > written using something like=0D=0A> > > /static/mylogo.jpg"/> or similarly,=0D=0A> > instead=0D=0A> > > of just=
plain html=0D=0A> > > .=0D=0A> > >=
That probably leads the JSP compiler to think it has to=0D=0A> "relativise=
"=0D=0A> > > the links to the app=0D=0A> > > context and so on, while in th=
is case it should not, because they=0D=0A> > will=0D=0A> > > be served by t=
he=0D=0A> > > front-end, not by Tomcat.=0D=0A> > >=0D=0A> > >=0D=0A> > >=0D=
=0A> > > Jeffrey Janner wrote:=0D=0A> > > > Httpd 2.2.17=0D=0A> > > > Tomca=
t 6.0.29=0D=0A> > > > Sun JDK 1.6.0=5F22=0D=0A> > > > Spring Framework (3.0=
=2E2 I think)=0D=0A> > > > All on Windows=0D=0A> > > >=0D=0A> > > > The Dev=
team is creating a new app that we are planning to deploy=0D=0A> > > using=
httpd as a load-balancer to two Tomcats on separate servers.=0D=0A> > > Ht=
tpd is configured to serve static files - graphics, css, etc. -=0D=0A> > wi=
th=0D=0A> > > everything else being sent to the Tomcat servers over AJP. T=
he=0D=0A> > Tomcat=0D=0A> > > app has one jsp file setup as the welcome-fil=
e, which just does a=0D=0A> > > redirect to host/app/login, which is an int=
ernal action that=0D=0A> > generates=0D=0A> > > the real login screen. All=
other parts of the app are buried in=0D=0A> the=0D=0A> > > WEB-INF/classes=
structure (as far as I can tell).=0D=0A> > > >=0D=0A> > > > We are current=
ly testing the setup, and if you go to=0D=0A> > > http://prtltest.polydyne.=
com, everything seems to work just fine.=0D=0A> > The=0D=0A> > > browser ge=
ts redirected to=0D=0A> http://prtltest.polydyne.com/Portal/login=0D=0A> > =
> and the screen looks fine. The problem is if you go directly to=0D=0A> t=
he=0D=0A> > > login page, bypassing the welcome-file redirect, then you don=
't get=0D=0A> > the=0D=0A> > > static files. If you refresh the page, ever=
ything shows up again.=0D=0A> > > >=0D=0A> > > > Looking at the source of t=
he login page, it appears that all the=0D=0A> > > static links have the jse=
ssionid appended to them on the first=0D=0A> load,=0D=0A> > > but not on su=
bsequent loads. I assume this is because Tomcat=0D=0A> hasn't=0D=0A> > > d=
etermined cookie support yet when it generates the page the first=0D=0A> > =
> time, but does know about it on the refresh. My question is, is=0D=0A> >=
there=0D=0A> > > something the Dev team should be doing before generating =
the login=0D=0A> > > page, or generating the static links, or is there a co=
nfiguration=0D=0A> > > setting I'm missing in the httpd.conf file=3F Or pe=
rhaps in the=0D=0A> > web.xml=3F=0D=0A> > > >=0D=0A> > > > Jeff=0D=0A> > > =
>=0D=0A> > > > The httpd.conf file is pretty stock, with the following adde=
d for=0D=0A> > the=0D=0A> > > load-balancer configuration:=0D=0A> > > >=0D=0A=
> > > > =0D=0A> > > > SetHandler balancer-man=
ager=0D=0A> > > >=0D=0A> > > > Order Deny,Allow=0D=0A> > > > Deny from =
all=0D=0A> > > > Allow from 10.1.1 127.0.0.1=0D=0A> > > > =0D=0A=
> > > >=0D=0A> > > > =0D=0A> > > > =
BalancerMember ajp://prtltest01:8009/Portal=0D=0A> > > route=3Dtomcat1 =
loadfactor=3D50=0D=0A> > > > BalancerMember ajp://prtltest0=
2:8009/Portal=0D=0A> > > route=3Dtomcat2 loadfactor=3D50=0D=0A> > > > =0D=0A> > > >=0D=0A> > > > ProxyPass /Portal/static !=0D=0A> > > > Proxy=
Pass /Portal balancer://mycluster=0D=0A> > > stickysession=3DJSESSIONID|jse=
ssionid scolonpathdelim=3DOn=0D=0A> > > > ProxyPass / balancer://mycluster/=0D=
=0A> > stickysession=3DJSESSIONID|jsessionid=0D=0A> > > scolonpathdelim=3DO=
n=0D=0A> > > >=0D=0A> > > > The web.xml file is:=0D=0A> > > >=0D=0A> > > > =
<=3Fxml version=3D"1.0" encoding=3D"UTF-8"=3F>=0D=0A> > > > > > xmlns:xsi=3D=
"http://www.w3.org/2001/XMLSchema-instance"=0D=0A> > > xsi:schemaLocation=3D=
"http://java.sun.com/xml/ns/javaee=0D=0A> > > http://java.sun.com/xml/ns/ja=
vaee/web-app=5F2=5F5.xsd">=0D=0A> > > > Polydyne Portal A=
pplication=0D=0A> > > > =0D=0A> > >=
> =0D=0A> > > > log4jConfigLocation=
=0D=0A> > > > /WEB-INF/log4j.properties=
param-value>=0D=0A> > > > =0D=0A> > > > =0D=
=0A> > > > > > class>org.springframework.web.util=
=2ELog4jConfigListener > class>=0D=0A> > > > =0D=0A> > > > =0D=0A> > > > conte=
xtConfigLocation=0D=0A> > > > =0D=0A> > >=
> /WEB-INF/Portal-service.xml=0D=0A> > > > /WEB-IN=
F/Portal-security.xml=0D=0A> > > > =0D=0A> > > > =
=0D=0A> > > > =0D=0A> > > > > >=0D=0A> >=0D=0A> class>org.springframework.web.context.ContextL=
oaderListener > > class>=0D=0A> > > > =0D=0A=
> > > >=0D=0A> > > > =0D=0A> > > > =
=0D=0A> > > > > >=0D=0A> >=0D=0A> cl=
ass>org.springframework.security.web.session.HttpSessionEventPublishe=0D=0A=
> > > r=0D=0A> > > > =0D=0A> > > >=0D=0A> >=
> > =0D=0A> > > > =
=0D=0A> > > > characterEncodingFilter=0D=0A> > > > > >=0D=0A> class>org.springfram=
ework.web.filter.CharacterEncodingFilter > > class>=0D=0A> =
> > > =0D=0A> > > > encoding
=0D=0A> > > > UTF-8=0D=0A>=
> > > =0D=0A> > > > =0D=0A> > > >=
forceEncoding=0D=0A> > > > =
true=0D=0A> > > > =0D=0A>=
> > > =0D=0A> > > > =0D=0A> > > > =
characterEncodingFilter=0D=0A> > > > /*=0D=0A> > > > =0D=0A> > > >=0D=
=0A> > > > =0D=0A> > > > =0D=0A> > > > springSecurityFilterChain=0D=0A> > > > > > class>org.springframework.web=
=2Efilter.DelegatingFilterProxy > > class>=0D=0A> > > > =
=0D=0A> > > > =0D=0A> > > > springSecurityFilterChain=0D=0A> > > > /*=0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =
=0D=0A> > > > default=0D=0A> > > > /static/*=0D=0A> > > > =
=0D=0A> > > >=0D=0A> > > > =0D=0A> > > > =
Portal=0D=0A> > > > > > class>org.springframework.web.servlet.DispatcherServlet > class>=0D=0A> > > > 2=0D=0A=
> > > > =0D=0A> > > > =0D=0A> > > > =
Portal=0D=0A> > > > /=
=0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =
=0D=0A> > > > 30=0D=0A> > > > =0D=0A> > > > =0D=0A> > > > =0D=0A> > > > redirect.jsp=0D=
=0A> > > > =0D=0A> > > > =0D=0A> > =
> > > > type>javax.servlet.UnavailableException<=
/exception-type>=0D=0A> > > > /WEB-=0D=0A> INF/views/erro=
rs/Unavailable.html=0D=0A> > > > =0D=0A> > > > =
=0D=0A> > > > 503=0D=
=0A> > > > /WEB-=0D=0A> INF/views/errors/Unavailable.html=
=0D=0A> > > > =0D=0A> > > > =0D=0A> >=
> >=0D=0A> > >=0D=0A> >=0D=0A> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=0D=0A> > > =5F=5F=5F=0D=0A> > > >=0D=0A> > > > Confident=
iality Notice: This Transmission (including any=0D=0A> > > attachments) ma=
y contain information that is privileged,=0D=0A> > confidential,=0D=0A> > >=
and exempt from disclosure under applicable law. If the reader of=0D=0A> =
> this=0D=0A> > > message is not the intended recipient you are hereby noti=
fied that=0D=0A> > any=0D=0A> > > dissemination, distribution, or copying o=
f this communication is=0D=0A> > > strictly prohibited.=0D=0A> > > >=0D=0A>=
> > > If you have received this transmission in error, please=0D=0A> immed=
iately=0D=0A> > > reply to the sender or telephone (512) 343-9100 and delet=
e this=0D=0A> > > transmission from your system.=0D=0A> > > >=0D=0A> > >=0D=
=0A> > >=0D=0A> > > -------------------------------------------------------=
------------=0D=0A> --=0D=0A> > > To unsubscribe, e-mail: users-unsubscribe=
@tomcat.apache.org=0D=0A> > > For additional commands, e-mail: users-help@t=
omcat.apache.org=0D=0A> > >=0D=0A> >=0D=0A> >=0D=0A> =5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=0D=0A> > =5F=5F=5F=0D=0A> >=0D=0A> =
> Confidentiality Notice: This Transmission (including any=0D=0A> attachme=
nts)=0D=0A> > may contain information that is privileged, confidential, and=
exempt=0D=0A> > from disclosure under applicable law. If the reader of th=
is message=0D=0A> is=0D=0A> > not the intended recipient you are hereby not=
ified that any=0D=0A> > dissemination, distribution, or copying of this com=
munication is=0D=0A> > strictly prohibited.=0D=0A> >=0D=0A> > If you have r=
eceived this transmission in error, please immediately=0D=0A> > reply to th=
e sender or telephone (512) 343-9100 and delete this=0D=0A> > transmission =
from your system.=0D=0A> >=0D=0A> >=0D=0A> > ------------------------------=
---------------------------------------=0D=0A> > To unsubscribe, e-mail: us=
ers-unsubscribe@tomcat.apache.org=0D=0A> > For additional commands, e-mail:=
users-help@tomcat.apache.org=0D=0A> >=0D=0A>=20=0D=0A> =5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=0D=0A> =5F=5F=5F=0D=0A>=20=0D=0A=
> Confidentiality Notice: This Transmission (including any attachments)=0D=
=0A> may contain information that is privileged, confidential, and exempt=0D=
=0A> from disclosure under applicable law. If the reader of this message i=
s=0D=0A> not the intended recipient you are hereby notified that any=0D=0A>=
dissemination, distribution, or copying of this communication is=0D=0A> st=
rictly prohibited.=0D=0A>=20=0D=0A> If you have received this transmission =
in error, please immediately=0D=0A> reply to the sender or telephone (512) =
343-9100 and delete this=0D=0A> transmission from your system.=0D=0A>=20=0D=
=0A>=20=0D=0A> ------------------------------------------------------------=
---------=0D=0A> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.or=
g=0D=0A> For additional commands, e-mail: users-help@tomcat.apache.org=0D=0A=
>=20=0D=0A=0D=0A=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=0D=0A=0D=0AConfidentiality Notice: This Transmission (includi=
ng any attachments) may contain information that is privileged, confidentia=
l, and exempt from disclosure under applicable law. If the reader of this =
message is not the intended recipient you are hereby notified that any diss=
emination, distribution, or copying of this communication is strictly prohi=
bited. =20=0D=0A=0D=0AIf you have received this transmission in error, plea=
se immediately reply to the sender or telephone (512) 343-9100 and delete t=
his transmission from your system.=0D=0A
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org