can we use RequestDispatcher to hit URL out of the current server..
some thing like this
RequestDispatcher dis_ = getServletContext().getRequestDispatcher("http://www.google.com/search?q=JSP").
Thanks
-Venu
-
RequestDispatcher (1 messages)
- Posted by: Venu Gopal Amaravadi
- Posted on: October 30 2001 23:50 EST
Threaded Messages (1)
- RequestDispatcher by Geoffrey Wiseman on October 31 2001 01:45 EST
-
RequestDispatcher[ Go to top ]
- Posted by: Geoffrey Wiseman
- Posted on: October 31 2001 01:45 EST
- in response to Venu Gopal Amaravadi
If you're using the ServletContext to retrieve a request dispatcher, you can only get them for named servlets or paths relative to the context root.
There's nothing in the RequestDispatcher interface itself (AFAIK) that would stop it from being used from a remote site, but there's no way that I'm aware of to get one.
If you were looking to perform a forward, though, you could use response.sendRedirect( ).