I have a servlet "servlet1" which should invoke another servlet
"servlet2" running on a different machine to get the response and pass
it on to the client.
i am using tomcat 4.0.
how can i do this?
I tried with the following code, but doesn't work:
////////////////Code//////////////
response.setContentType("text/html");
PrintWriter out = response.getWriter();
ServletConfig config = getServletConfig();
ServletContext context =
config.getServletContext();
RequestDispatcher dispatcher =
context.getRequestDispatcher
("http://machine2:8080/HelloWorldExample3");
dispatcher.forward(request, response);
}
//////////End Code ////////////////
thanks,
vasu
___________________________________________________________________________
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