Notes on configuring the virtual path in the web.xml file

 

 1. The Servlet-class sub-element must be in the format of package name.+servlet class name

2. The url-pattern virtual path does not necessarily have the format of /package name/+class name, but /+random symbols that conform to the URL format can be used

As shown in the picture:

 

 

3. Multiple mapping paths, that is, multiple access paths (entries) of a servlet file, are written in the same way as "2.".

4. The servlet-name is the same as the servlet class name

Guess you like

Origin blog.csdn.net/weixin_62222095/article/details/127035047