What is the role of servlet-mapping in the servlet's configuration?

  • It configures the servlet's initialization parameters.
  • It defines the servlet's behavior in handling HTTP requests.
  • It determines the servlet's load-on-startup configuration.
  • It specifies the URL pattern to associate with a servlet.
Servlet-mapping in the web.xml file associates a URL pattern with a servlet, specifying which requests should be directed to that servlet for processing. It helps in defining the servlet's mapping to incoming URLs.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *