web.xml configuration and description
<servlet>
<servlet-name>NowListServlet</servlet-name>
<servlet-class>com.budaye.management.self.servlet.NowListServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>NowListServlet</servlet-name>
<url-pattern>/nowlist</url-pattern>
</servlet-mapping>
The matching process of the servlet container to the URL requires the servlet-mapping configuration item.
- servlet-name: Same as the servlet-name in the servlet tag.
- url-pattern: indicates the access address of the service after removing the base url (the context path of the url). For example, the complete url in this example is: http://localhost:8088/management/nowlist. When I am asked to use the url, I will find the corresponding service through the url-pattern attribute.
It should be noted here that the @WebServlet annotation items defined in the code class should be deleted, otherwise, in eclipse, an error will be reported during debugging.
PS: For more more content..., please check --> "Server Development"
PS: More more content..., please check --> "Server Development"
PS: More more content..., please check --> "Server Development"