Servlet and servlet-mapping label "reprint" in the Servlet Project Web. xml

Source: Internet
Author: User

Extract the Web. xml file fragment of a project:



The access order is 1->2->3->4, where the values of 2 and 3 must be the same.

The value in the Url-pattern tag is the URL to be entered in the browser's address bar, which can be named by itself, which accesses a servlet named Servlet-name, and the value of the two Servlet-name tags must be the same because the values in the servlet tag The Servlet-name tag maps to the value in the Servlet-class tag and ultimately accesses the class in the Servlet-class tag.

also, the/Expression of Web. http://localhost:8080/+ project name
Instead, the. JSP page has an action that adds/represents an absolute path http://localhost:8080/, and no plus/indicates a relative path

Servlet and servlet-mapping label "reprint" in the Servlet Project Web. xml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.