没有找到带有URI-Spring Error的HTTP请求的映射

时间:2017-03-01 07:00:43

标签: xml spring spring-mvc web.xml

我有以下web.xml文件。服务器配置是JBOSS 6.1,我使用Spring STS进行开发。问题出在服务器启动时,有时(并不总是),我得到默认值" QbatLogin.jsp& #34;页面,但其余页面没有出现。我使用Maven。 它显示找不到URI错误的映射。

     <?xml version="1.0" encoding="UTF-8"?>
     <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
     http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
     version="3.1">
     <display-name>qbatPortal</display-name>
     <welcome-file-list>
     <welcome-file>QbatLogin.jsp</welcome-file>
      </welcome-file-list>

<listener>
     <listener-class>qbat.application.startup.QbatAppListener</listener-class>
</listener>

<servlet>
    <servlet-name>qbatPortal</servlet-name>
    <servlet-class>
        org.springframework.web.servlet.DispatcherServlet
    </servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/qbatPortal-servlet.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>qbatPortal</servlet-name>
    <url-pattern>/welcome.jsp</url-pattern>
    <url-pattern>/welcome.html</url-pattern>
    <url-pattern>/home.html</url-pattern>
    <url-pattern>/create</url-pattern>
    <url-pattern>/market</url-pattern>

    <url-pattern>*.html</url-pattern>

    <!--save button-->
    <url-pattern>/saveaction</url-pattern>
</servlet-mapping>

错误如下

12:27:15,961警告
        [org.springframework.web.servlet.PageNotFound](http- localhost / 127.0.0.1:8080-2)在DispatcherServlet中找不到带有URI [/ qbatPortal / market]的HTTP请求的映射,其名称为&#39; qbatPortal&#39; 12:27:15,961 INFO [stdout](http-localhost / 127.0.0.1:8080-2)警告2017-03-01 12:27:15,961(::) [org.springframework.web.servlet.PageNotFound]:否在DispatcherServlet中使用URI [/ qbatPortal / market]为HTTP请求找到的映射名称为&#39; qbatPortal&#39;

0 个答案:

没有答案