SpringMVC address problems encountered map

If jsp files are written directly under the WebContent, the absolute path of href is the project name + jsp file name. If that is the new directory in the WebContent under the absolute path of the project is to address the href name + New Folder name + jsp file name. Controller is an absolute path in the project root directory. So the path of the front page if the words were not in the project root directory, use hyperlinks to jump when it is not in the project root directory.
Examples: localhost: 8080 / JavaEE / JSP / hello3.action hyperlink wrong path, because the jump page built under WebContent / JSP, hello3.action using the Controller, the correct address should be localhost: 8080 / JavaEE / hello3.action. So the front jsp and Controller address inconsistencies mapping error.

Guess you like

Origin www.cnblogs.com/lixiaojing/p/12662634.html