spring mvc action 不带项目名,导致访问不到action,怎么解决?

springmvc访问action的时候地址:http://localhost:8081/system/...,system前面没有项目名,访问异常,这是什么原因?
submit
web.xml的配置
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaeehttp://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
dispatcherServlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
1
dispatcherServlet
/
contextConfigLocation
classpath:spring/springContext.xml
org.springframework.web.context.ContextLoaderListener
springCharacterEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter
forceEncoding
true
encoding
UTF-8
springCharacterEncodingFilter
/*
InitLog4J
InitLog4J
cqsoft.servlets.InitLog4J
log4j
WEB-INF\classes\properties\log4j.properties
3
InitLog4J
/InitLog4J
log4jConfigLocation
classpath:properties/log4j.properties
org.springframework.web.context.request.RequestContextListener
submit.jsp
慕运维8079593
浏览 1143回答 2
2回答

幕布斯6054654

如果项目放在/tomcat/webapps/非ROOT/下,url中要加上项目名。如果配置了ROOT文件夹访问,url中就不加项目名。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript