I am trying to pass data from one servlet to another using the RequestDispatcher. This is my code for the Dispatcher.
String address;
address = \"/Java Reso
You just need to pass servlet-mapping
's url-pattern
in the getRequestDispatcher
.
Let say your servlet mapping is "myMap" for the "MapOut" Servlet in the web.xml
.Then it should be
RequestDispatcher dispatcher = request.getRequestDispatcher("/myMap");
dispatcher.forward(request,response);
doGet()
of forwarded Servlet will be called.
Example: web.xml
MapOut
coreservlets.MapOut
MapOut
/myMap