tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramu, Vinod" <>
Subject RE: How to redirect to a different host
Date Thu, 17 Mar 2005 20:16:35 GMT
You may have to use JSTL in your page. 

JSTL provides a tag called "import" that has the capability to import
contents from other site to your page. So you may built a page that
looks like

<%@ taglib prefix="c" uri="" %>

<c:import url="http://shoppingcarthost:8080/shopping"/>

When the user requests "webhost:8080/shopping" use the
response.sendRedirect() to direct to his request to this new page. This
page will in turn post a request to a new container on a different

Don't forget to include JSTL jar files into your container. 


-----Original Message-----
From: Dan [] 
Sent: Thursday, March 17, 2005 2:58 PM
To: Tomcat Users List
Subject: How to redirect to a different host

Is there anyway to configure Tomcat (without using apache) to redirect 
requests for a particular context to a new url (and host)

Here's the scenario on the main page there is a link to a shopping cart 
context.  This webapp does not run on this machine, it's running on a
separate system, so what I want to do is:

when the context webhost:8080/shopping is requested the request is
to shoppingcarthost:8080/shopping.  Is it possible to do this in the 
server.xml file, or does it have to be done somewhere else.

I know how to do this with apache, but using apache is not an option in
case.  I need to know how to to do this independent of apache.  Just
Tomcat configuration files.

Daniel McMillan

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message