求助大神Maven Spring mvc Mybatis 页面 404 纠结了一天!没找到错误.. 求各位大神指点 10
下图依次为:1项目结构2web.xml3spring-mvc.xml4spring-context.xml5controller.java6访问错误页面...
下图依次为 : 1 项目结构 2 web.xml 3 spring-mvc.xml 4 spring-context.xml 5 controller.java 6 访问错误页面
展开
1个回答
展开全部
web 你貌似少写了 这是我的配置文件
<servlet>
<servlet-name>springDispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>l</servlet-name>
<servlet-class>l</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>springDispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>l</servlet-name>
<url-pattern>/servlet/l</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>springDispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>l</servlet-name>
<servlet-class>l</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>springDispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>l</servlet-name>
<url-pattern>/servlet/l</url-pattern>
</servlet-mapping>
追问
可以明示麽? 对比了一下,没发现少什么啊!~~
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询