Home > Back-end >  Project directory in the pages in the request cannot be mapped to the Controller
Project directory in the pages in the request cannot be mapped to the Controller

Time:09-22

Is my regist a page. The JSP on my project web directory in a subdirectory, in the page request. This request cannot be mapped to the Controller. Put the page in a web directory is able to map in.

Request path left

The mapping configuration Controller left


The servlet configuration left


This is the request path problem? I in class @ RequestMapping plus I subdirectory (@ RequestMapping (" studentDemo/studentController)).

Bosses guidance, thank you!

CodePudding user response:

Your controller is on which path

CodePudding user response:

Address "/" beginning

CodePudding user response:

reference 1st floor renjiawush1314 response:
your controller is on which path

The Controller is a class, in the classpath

CodePudding user response:

refer to the second floor luckyZQC response:
address "/"

Request the address? In that case it request, it is not the project, directly on the address bar is localhost: 8080/request address

CodePudding user response:

request address

CodePudding user response:

You didn't, the error page project starts, enter the page, press f12 a look

CodePudding user response:

refer to 6th floor renjiawush1314 response:
you didn't, the error page after launch, enter the page, press f12 under

Is the requested page at 404, I regist this page no problem

CodePudding user response:

Then don't use relative paths, with absolute path directly, if you want to know where is wrong, more layers in the absolute path to the successful cases, reduce the road ahead and see what is under the relative path to succeed, then compare your current path of the error
  • Related