Carlo Indolfi wrote:

> Hi to everyone!
> I'm here again with another question!
> Thanks to your help I'm now able to perform a Servlet A
> that send an object to Servlet B. Servlet B make operations
> on this Object and the control returns to Servlet A, with the
> .include() method. But I've noted that the URL given to the
> getRequestDispatcher() must be in the form /dir/dir/file.ext.
> Now my new problem is folloqing explained:
> My Servlet B have to stay on another Web Server, then i need
> a method tha accepts URLS in the classic form
> "http://my_other_host.domain/ServletB"
> How can I perform this new step?? Or better, is it
> possible??
>
> Thank's in advance
> Regards
> Carlo
>

The RequestDispatcher.include() and RequestDispatcher.forward() calls are
designed to access resources on the same server (more precisely, in the same
servlet context) as the calling servlet.  If you want to access a resource
from another web server, that is real easy -- just use a
java.net.URLConnection object to download that resource.  There's an example
of this in the Java Language Tutorial at Javasoft's web
site (http://java.sun.com) as well as lots of other places.

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to