Re: Tomcat: two context path for one webapp
AlbundySzabolcs wrote: Hi, I have been trying to solve a problem, but I have not found any good solution yet. The problem is: I have a web app and this web app is deployed to the $TOMCAT_HOME/webapps/XXX directory. I can reach that on the http://localhost:8080/XXX address BUT, I would like to reach the web app on the http://localhost:8080/YYY address too. I added the following to the server.xml: Server Service Engine Host ... Context path=/YYY docBase=XXX/Context /Host /Engine /Service /Server It helped but the Tomcat started two web contexts and it caused some other problem. Is it possible to create a multiple address for one web app and both address represent same webapp? We had this configuration running in production for a number of years with no problem (the webapp could be reached under / and under /webapp). Technically, these are two different applications running from the same files, so session IDs cannot be exchanged between them. What were the problems you encountered? Regards, Oliver Schoett - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat: two context path for one webapp
Hello Chuck, thanks for you reply. The UrlRewriteFilter is almost solved my problem. But there is an unexcepted effect: when I opened the page with the http://localhost:4041/YYY the URL changed to http://localhost:8080/XXX. Is it possible to hide this redirect anyway? Caldarale, Charles R wrote: From: AlbundySzabolcs [mailto:albundyalbu...@freemail.hu] Subject: Tomcat: two context path for one webapp I have a web app and this web app is deployed to the $TOMCAT_HOME/webapps/XXX directory. I can reach that on the http://localhost:8080/XXX address BUT, I would like to reach the web app on the http://localhost:8080/YYY address too. The easiest way is to just use a URL rewrite filter to forward or redirect all requests for the secondary name to the real one: http://tuckey.org/urlrewrite/ You don't need to go through the unnecessary hassle and performance degradation of adding httpd to the mix. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat%3A-two-context-path-for-one-webapp-tp26304708p2675.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat: two context path for one webapp
From: AlbundySzabolcs [mailto:albundyalbu...@freemail.hu] Subject: RE: Tomcat: two context path for one webapp Is it possible to hide this redirect anyway? Configure the rewrite filter to do a forward, not a redirect, and use relative, not absolute, links in your webapp. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat: two context path for one webapp
Hi, I have been trying to solve a problem, but I have not found any good solution yet. The problem is: I have a web app and this web app is deployed to the $TOMCAT_HOME/webapps/XXX directory. I can reach that on the http://localhost:8080/XXX address BUT, I would like to reach the web app on the http://localhost:8080/YYY address too. I added the following to the server.xml: Server Service Engine Host ... Context path=/YYY docBase=XXX/Context /Host /Engine /Service /Server It helped but the Tomcat started two web contexts and it caused some other problem. Is it possible to create a multiple address for one web app and both address represent same webapp? -- View this message in context: http://old.nabble.com/Tomcat%3A-two-context-path-for-one-webapp-tp26304708p26304708.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat: two context path for one webapp
By any chance, do you have an Apache httpd server in front of this tomcat instance? The first solution that comes to my mind is using mod_rewrite with some rewrite rules on the httpd server so that the web browser client sees http://localhost:8080/YYY but it is really http://localhost:8080/XXX DJ On Wed, 2009-11-11 at 08:57 -0800, AlbundySzabolcs wrote: Hi, I have been trying to solve a problem, but I have not found any good solution yet. The problem is: I have a web app and this web app is deployed to the $TOMCAT_HOME/webapps/XXX directory. I can reach that on the http://localhost:8080/XXX address BUT, I would like to reach the web app on the http://localhost:8080/YYY address too. I added the following to the server.xml: Server Service Engine Host ... Context path=/YYY docBase=XXX/Context /Host /Engine /Service /Server It helped but the Tomcat started two web contexts and it caused some other problem. Is it possible to create a multiple address for one web app and both address represent same webapp? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat: two context path for one webapp
From: AlbundySzabolcs [mailto:albundyalbu...@freemail.hu] Subject: Tomcat: two context path for one webapp I have a web app and this web app is deployed to the $TOMCAT_HOME/webapps/XXX directory. I can reach that on the http://localhost:8080/XXX address BUT, I would like to reach the web app on the http://localhost:8080/YYY address too. The easiest way is to just use a URL rewrite filter to forward or redirect all requests for the secondary name to the real one: http://tuckey.org/urlrewrite/ You don't need to go through the unnecessary hassle and performance degradation of adding httpd to the mix. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org