tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramu, Vinod" <X2VR...@southernco.com>
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="http://java.sun.com/jstl/core" %>

<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
machine.

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

Vinod


-----Original Message-----
From: Dan [mailto:dmstuff@tsiware.com] 
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
totally 
separate system, so what I want to do is:

when the context webhost:8080/shopping is requested the request is
redirected 
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
this 
case.  I need to know how to to do this independent of apache.  Just
using 
Tomcat configuration files.

Thanks
Daniel McMillan

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message