top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How do I capture a request and dispatch the exact request (with all the parameters received) to another URL?

+1 vote
51 views
How do I capture a request and dispatch the exact request (with all the parameters received) to another URL?
posted Nov 30, 2015 by Shyam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

As far as i know it depends on the location of the next target url.
If the next servlet url is in the same host, then you can use the forward method.
Here is an example code about using forward:

               RequestDispatcher rd = null;
               String targetURL = "target_servlet_name";
               ServletContext ctx = this.getServletContext();
               rd = ctx.getRequestDispatcher(targetURL);
               rd.forward(request, response);
answer Dec 8, 2015 by Karthick.c
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...