How to redirect a web page from Tomcat to your browser?

2008-09-22 Thread DeanM

This question's probably been asked a hundred times but it's new to me and I
haven't found anything directly helpful in my newbieness. I have a servlet
running on Tomcat on a remote machine. The application is a web site. What I
want to do is have some links on the index page that go to a secure server
out in The Great Cloud Of The Intertubes. Now I can't just put plain html
links on the index page, because then if you click on them, naturally your
browser will go to the secure server to try and get pages from it. The way
the secure server is set up, it looks at the requesting IP address and if
you're not on the invite list, then you don't get in. The remote machine
with the Tomcat server on it has an approved IP address, so the secure
server will talk it, just not to me here as my IP is different.

So, question is, how do I set up a mechanism so that you click on a link on
the index page for the URL you want, Tomcat takes this and sends the request
to the secure server, the secure server sends the page(s) back to Tomcat and
then Tomcat throws it at your browser?

Thanks for any help on this. 
-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-a-web-page-from-Tomcat-to-your-browser--tp19610550p19610550.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect a web page from Tomcat to your browser?

2008-09-22 Thread Hassan Schroeder
On Mon, Sep 22, 2008 at 8:35 AM, DeanM [EMAIL PROTECTED] wrote:

 So, question is, how do I set up a mechanism so that you click on a link on
 the index page for the URL you want, Tomcat takes this and sends the request
 to the secure server, the secure server sends the page(s) back to Tomcat and
 then Tomcat throws it at your browser?

You need to write (or find) a proxy/reverse-proxy servlet.

Alternatively, you could use Apache httpd that purpose. More moving
parts, but possibly less work. :-)

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect a web page from Tomcat to your browser?

2008-09-22 Thread DeanM

You need to write (or find) a proxy/reverse-proxy servlet.

Alternatively, you could use Apache httpd that purpose. More moving
parts, but possibly less work. :-)




So you mean set up Apache and have Tomcat plug in to it? In other words,
make Apache the front end my browser talks to, instead of using Tomcat on
its own.
-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-a-web-page-from-Tomcat-to-your-browser--tp19610550p19610777.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect a web page from Tomcat to your browser?

2008-09-22 Thread Jeff
On Mon, Sep 22, 2008 at 10:46 AM, DeanM [EMAIL PROTECTED] wrote:

 You need to write (or find) a proxy/reverse-proxy servlet.

 Alternatively, you could use Apache httpd that purpose. More moving
 parts, but possibly less work. :-)




 So you mean set up Apache and have Tomcat plug in to it? In other words,
 make Apache the front end my browser talks to, instead of using Tomcat on
 its own.

Not exactly. The Apache proxy would be independent of Tomcat. Your
link in the servlet would simply link to the local, proxied address
served by Apache.

See ProxyPass and ProxyPassReverse in the Apache docs.

-- 
Jeff

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect a web page from Tomcat to your browser?

2008-09-22 Thread DeanM


jlar310 wrote:
 
 Not exactly. The Apache proxy would be independent of Tomcat. Your
 link in the servlet would simply link to the local, proxied address
 served by Apache.
 
 See ProxyPass and ProxyPassReverse in the Apache docs.
 

OK thanks I'll go and have a read.

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-a-web-page-from-Tomcat-to-your-browser--tp19610550p19610933.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]