Web project under Eclipse path Jump

Project is structured as follows:

src                : com.restaurant.servlet --> RegisterServlet

WebContent : ch03                            -->  register.jsp

 

Browser and enter localhost: 8080 / /ch03/register.jsp project name to jump to the src RegisterServlet

Using a relative path should be written jsp: action = "/ restaurant / servlet / RegisterServlet"

Use an absolute path can not access can only use relative paths

 

Saying:

Relative path: Jump start is initiated the path of the file localhost: 8080 / project name /xxx.jsp----localhost:8080/ project name / xxxServlet

Absolute path: Start plus / path is the IP address of the server localhost: 8080 / project name /xxx.jsp----localhost:8080/ project name / xxxServlet

 

Reference blog: https://www.wandouip.com/t5i210656/

Guess you like

Origin www.cnblogs.com/liupengjuan/p/10968977.html