You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gianluca D'Introno <gi...@hotmail.com> on 2002/01/03 17:55:12 UTC
Servlet Filter
Can I use Filter to send resource stored in another webserver to client
browser?
How can I do it?
Thanks!!!
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Servlet Filter
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 3 Jan 2002, Gianluca D'Introno wrote:
> Date: Thu, 3 Jan 2002 17:55:12 +0100
> From: Gianluca D'Introno <gi...@hotmail.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat list <to...@jakarta.apache.org>
> Subject: Servlet Filter
>
> Can I use Filter to send resource stored in another webserver to client
> browser?
> How can I do it?
> Thanks!!!
>
You could do this kind of thing in a Filter, but that's not really what
they are designed for.
However, you can do it with a standard Servlet as well -- in the doGet()
and/or doPost() methods of your servlet, you would use an
HttpURLConnection to go get the data from the remote webserver, and then
copy it to the output of this request. There's some example code for
using HttpURLConnection in the Java Language Tutorial (see the Networking
Trail) at <http://java.sun.com/docs/books/tutorial/>.
Craig McClanahan
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>