Questions tagged [requestdispatcher]

The request dispatcher is used for receiving requests from the client and sending them to any resource (such as a servlet, HTML file, or JSP file) on the server.

The request dispatcher is used for receiving requests from the client and sending them to any resource (such as a servlet, HTML file, or JSP file) on the server. The most common approach is forward or include resource to the client.

The servlet container creates the RequestDispatcher object, which is used as a wrapper around a server resource located at a particular path or given by a particular name.

See RequestDispatcher API docs for details.

213 questions
-2
votes
1 answer

I didn't success to call a servlet inside another servlet

I have servlet A where there is this code : protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher rd = request.getRequestDispatcher("gestion-avis"); …
jozinho22
  • 459
  • 2
  • 7
  • 24
-2
votes
1 answer

getOutputStream() has already been called for this response

getOutputStream() has already been called for this response this error comes in line where I have forwarded the response to some other page.. rd.forward(req,res);
Squid
  • 1
  • 1
  • 1
-2
votes
2 answers

can be change the url in request dispatcher

Is it possible to change the url in case of request dispatch . This is my code public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { List data=…
1 2 3
14
15