Servlet Access Path

zhaozj2021-02-16  85

http:// Company / Shopping / LoginServlet

Usually use such a path to access a servlet in the Webroot / Company / Shopping / Web-INF / CLASS directory

http:// Company / Shopping / Servlet / Login

By default, servlet's URL is set under a servlet.

Invoker

/ servlet / *

http://company/shopping/servlet/com.ecommerce.test.loginservlet

Servlet In a package, add the packet path in the access path.

http:// Company / Shopping / Servlet / Login

In the configuration descriptor (for example, web.xml), configure the servlet name

Login

com.ecommerce.test.loginservlet

http:// Company / Shopping / Login

I don't want to have a servlet in the URL of Login.

Login

/

http:// Company / Shopping / Test / New / Login

I want to display / show in the URL of Login / Test / New /

Login

/ test / new /

Http:// Company / Shopping / Test / New / Everything

Let http:// company / shopping / test / new / offset from Login

Login

/ test / new / *

转载请注明原文地址:https://www.9cbs.com/read-13133.html

New Post(0)