0
回答
maven项目部署和编译成功后,无法访问默认页和其他页面
注册华为云得mate10,2.9折抢先购!>>>   

maven项目是我从外部导入到MyEclipse 10中的,在tomcat中部署编译都没有问题,但是在网页中访问的时候提示404,声明一下只是访问默认的欢迎界面而已,而且在访问其他界面时也不能也提示404,请问这是什么原因造成的?这是maven项目的目录截图,和web.xml的详细配置,有什么好的解决办法么?对于maven我是新手,才接触两个星期,回答请说的详细一点,谢谢各位了!!

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/applicationContext-*.xml</param-value>
</context-param>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>vcmSessionFactoryFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>sessionFactoryBeanName</param-name>
<param-value>vcmSessionFactory</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>vcmSessionFactoryFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

<servlet>
<description>Apache CXF Endpoint</description>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>

<servlet>
<description>StartUpInitServlet</description>
<display-name>StartUpInitServlet</display-name>
<servlet-name>StartUpInitServlet</servlet-name>
<servlet-class>com.vplus.vcm.startup.StartUpInitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<jsp-property-group>
<description></description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>true</scripting-invalid>
<include-prelude>/WEB-INF/index.jsp</include-prelude>
</jsp-property-group>
</jsp-config>

<error-page>
<error-code>404</error-code>
<location>/</location>
</error-page>

<listener>
<listener-class>com.vplus.vcm.listener.SessionListener</listener-class>
</listener>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>


<无标签>
举报
海_风
发帖于4年前 0回/4K+阅
顶部