Basic SpringMvC controller not working

心已入冬 提交于 2019-12-12 02:46:51

问题


I am trying to set up a basic MVC controller project. I have created a servlet and couple of jsp pages. I can deploy the project and access the jsp pages.

The problem starts when I try to use the LoginController. The error I am getting is 404 error. Please help.

I have attached a screenshot of my codes and project structure. I gut instinct is the dispatcher servlet is not working the way it suppose to (just a guess).

I have googled and fiddled with the code for the past 5 hours to no avail. This is my first time asking question on S/O enter image description hereso I apologies If this is not in the correct format.


回答1:


localhost:8084/springmvcDemo/login

change to

localhost:8084/springmvcDemo/spring-mvc/login

This link will help you



来源:https://stackoverflow.com/questions/39930611/basic-springmvc-controller-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!