Skip to content

VaishnaviSh14/ServletRequestDispatching-and-FiltersInServlet

Repository files navigation

ServletRequestDispatching

FifthServletApp - Pw SKills Registration page using servlet

The servlet provides a user-friendly registration confirmation page in response to the form submission. It dynamically generates HTML content based on the user's input and sends it as an HTTP response. When a user submits the registration form, this servlet processes the form data, generates an HTML response, and sends it back to the user's web browser for display.

image image

Request Dispatching mechanism

  1. using include
  2. using forward

using forward

============= forward => To transfer the request to one more component then we need to use forward approach.

RequestDispatcher rd = request.getRequestDispatcher("/second"); rd.forward(request, response);

The above line would take the control from the currently executed resource to the specified resource.

using include

+++++++++++++ => Incase of include approach the container will not remove the response added by first component rather the container will add the response from the first resource and it will forward it to second resource. => The response will be from TotalResponse = FirstResource + SecondResource

RequestDispatching -002

image image image

Releases

No releases published

Packages

No packages published