-none- 2007-09-05 - By Johnny Kewl
Back
-- -- Original Message -- -- From: "Angel Sotirov" <angel@(protected)> To: "Tomcat Users List" <users@(protected)> Sent: Wednesday, September 05, 2007 4:23 PM Subject: tomcat 6 application intercommunication
> hi guys, > > We have two application running on the same tomcat instance /app1 and > /app2. We need to run app2 from app1. Trying to do so calling /app2 > directly results in a call to host/app1/app2. Is there a way to find the > FQDN of the current virtual server so that we can call server/app2 > directly or maybe some other neat solution?
If I understand you... try this.
String callingURL = request.getRequestURL().toString(); String thisContext = request.getContextPath(); int contextIndex = callingURL.indexOf(thisContext ); String callingURLwithOutContext = callingURL.substring(0,contextIndex ); String app2Context = callingURLwithOutCntext + "/" + app2;
Maybe ;) and my choice of names really sucks
> > We are using tomcat 6 and java-1 (See http://ava-1.ora-code.com).5.0.12 > > Cheers, > > Angel > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ > To start a new topic, e-mail: users@(protected) > To unsubscribe, e-mail: users-unsubscribe@(protected) > For additional commands, e-mail: users-help@(protected) > >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To start a new topic, e-mail: users@(protected) To unsubscribe, e-mail: users-unsubscribe@(protected) For additional commands, e-mail: users-help@(protected)
|
|