You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Purcell <sp...@vertisinc.com> on 2002/08/09 19:57:12 UTC
RequestDispatcher question
Hello,
I am trying to send a (request, response) object to a server that lives at another IP (or URL). I have the need to pass parameters that are in the request object, but I cannot seem to forward the request to the other servlet. I keep getting a error: "java.lang.IllegalArgumentException: Path http://xxx.xxx.xxx.xxx/testcode/servlet/allparams does not start with a "/" character
When I try the same code on my local machine, within the same web app, all works great. So I think the coding is good. So I am trying to figure how to get the request object from one box to another? Any ideas?
Thanks,
Test Code:
// from a method here
try {
gotoPage("http://XXX.XXX.X.XXX/testcode/servlet/allparams", request, response);
response.sendRedirect(mm.getSomeURL());
}
private void gotoPage(String address,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(address);
dispatcher.forward(request, response);
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>