开发者

Submitting a form results in 404; when this is refreshed, original form redisplays

开发者 https://www.devze.com 2023-04-09 04:39 出处:网络
Sorry for a vague title but it\'s hard to be more specific. Platform used: Eclipse Helios, Tomcat 6, Maven 2.2.1

Sorry for a vague title but it's hard to be more specific.

Platform used: Eclipse Helios, Tomcat 6, Maven 2.2.1

Background/ Problem: I am doing a pilot for a conversion from JSF 1.2 to JSF2. The server starts fine and loads the converted login page and when doing so it connects to the bean. However when the login form is submitted it never reaches the bean and goes 404 instead and leaves no strack trace behind. The page it's supposed to navigate to is itself so it's not a question about not reaching another page, you can basically press F5 and it comes back asking for username and password. I cant figure out why it goes 404.

web.xml:

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

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param开发者_运维知识库-value>
            /WEB-INF/faces-config-logic.xml,
            /WEB-INF/ap-faces-config.xml,
            /WEB-INF/bup-faces-config.xml,
            /WEB-INF/bup-faces-config-logic.xml,
            /WEB-INF/qt-faces-config.xml,
            /WEB-INF/bs-faces-config.xml,
            /WEB-INF/bs-faces-config-logic.xml,
            /WEB-INF/fp/fp-faces-config-controller.xml,
            /WEB-INF/fp/fp-faces-config-service.xml,
            /WEB-INF/fp/fp-faces-config-dao.xml,
            /WEB-INF/fp/fp-navigation-rules.xml,
            /WEB-INF/pm/pm-faces-config-controller.xml,
            /WEB-INF/pm/pm-faces-config-service.xml,
            /WEB-INF/pm/pm-faces-config-dao.xml,
            /WEB-INF/pm/pm-navigation-rules.xml,
            /WEB-INF/rp/rp-faces-config-controller.xml,
            /WEB-INF/rp/rp-faces-config-service.xml,
            /WEB-INF/rp/rp-faces-config-dao.xml,
            /WEB-INF/rp/rp-navigation-rules.xml,
            /WEB-INF/ap/ap-faces-config-controller.xml,
            /WEB-INF/ap/ap-faces-config-service.xml,
            /WEB-INF/ap/ap-faces-config-dao.xml,
            /WEB-INF/ap/ap-navigation-rules.xml
    </param-value>
        <description>
            JSF config files beside faces-config.xml
    </description>
    </context-param>

    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
        <description>
            State saving method: "client" or "server" (= default)
            See
            JSF Specification 2.5.2
      </description>
    </context-param>

    <context-param>
        <param-name>org.apache.shale.view.VIEW_CONTROLLER_MAPPER</param-name>
        <param-value>com.wmdata.raindance.ap.ui.RDViewControllerMapper</param-value>
    </context-param>

    <!-- Rest -->
    <context-param>
        <param-name>resteasy.scan</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- Rest -->
    <context-param>
        <param-name>resteasy.servlet.mapping.prefix</param-name>
        <param-value>/resteasy</param-value>
    </context-param>

    <!-- Rest -->
    <context-param>
        <param-name>resteasy.resource.method-interceptors</param-name>
        <param-value>
            org.jboss.resteasy.core.ResourceMethodSecurityInterceptor
      </param-value>
    </context-param>

    <!-- Resource location directory of Birt resources used to locate images -->
    <context-param>
        <param-name>BIRT_RESOURCE_PATH</param-name>
        <param-value>image/default</param-value>
    </context-param>

    <!--filter> <filter-name>SessionFilter</filter-name> <filter-class>com.wmdata.raindance.portal.auth.SessionFilter</filter-class> 
        </filter -->

    <listener>
        <listener-class>com.wmdata.raindance.portal.config.InitApplication</listener-class>
    </listener>
    <listener>
        <listener-class>com.wmdata.raindance.portal.menu.PGMenuFactory</listener-class>
    </listener>
    <listener>
        <listener-class>com.wmdata.raindance.portal.config.InitAP</listener-class>
    </listener>
    <!-- Rest -->
    <listener>
        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
    </listener>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Streamdoc</servlet-name>
        <servlet-class>com.wmdata.raindance.servlets.Streamdoc</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>StreamAppendix</servlet-name>
        <servlet-class>com.wmdata.raindance.servlets.StreamAppendix</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>Movedoc</servlet-name>
        <servlet-class>com.wmdata.raindance.servlets.Movedoc</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>GetTicket</servlet-name>
        <servlet-class>com.wmdata.raindance.portal.auth.GetTicket</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ExtRepositoryReportRequest</servlet-name>
        <servlet-class>com.wmdata.raindance.bup.servlets.ExtRepositoryReportRequest</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>PurchaseCommission</servlet-name>
        <servlet-class>com.wmdata.raindance.servlets.PurchaseCommission</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>BirtResourceServlet</servlet-name>
        <servlet-class>com.wmdata.raindance.bup.birt.BirtResourceServlet</servlet-class>
    </servlet>

    <!-- Rest -->
    <servlet>
        <servlet-name>Resteasy</servlet-name>
        <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    </servlet>

    <!-- Use extensions mapping for Faces servlet -->   
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
  </context-param>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>

    <!-- Application servlets -->
    <servlet-mapping>
        <servlet-name>Streamdoc</servlet-name>
        <url-pattern>/rdservlets/Streamdoc</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>StreamAppendix</servlet-name>
        <url-pattern>/rdservlets/StreamAppendix</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Movedoc</servlet-name>
        <url-pattern>/rdservlets/Movedoc</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>GetTicket</servlet-name>
        <url-pattern>/rdservlets/GetTicket</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ExtRepositoryReportRequest</servlet-name>
        <url-pattern>/rdservlets/ExtRepositoryReportRequest</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>PurchaseCommission</servlet-name>
        <url-pattern>/rdservlets/PurchaseCommission</url-pattern>
    </servlet-mapping>

    <!-- Rest -->
    <servlet-mapping>
        <servlet-name>Resteasy</servlet-name>
        <url-pattern>/resteasy/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>BirtResourceServlet</servlet-name>
        <url-pattern>/rdservlets/BirtResourceServlet</url-pattern>
    </servlet-mapping>

    <session-config>
        <!-- 30 minutes -->
        <session-timeout>30</session-timeout>
    </session-config>


    <!-- Specifies which files the web app shall look for as default -->
    <!-- when no file has been specified in the URL -->
    <welcome-file-list id="default">
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
    </welcome-file-list>

<!--    <error-page>
        Handle all exceptions in the portal application
        <exception-type>java.lang.Throwable</exception-type>
        <location>/portal/noauth/showError.jsp</location>
    </error-page> -->

    <!-- JSP Component Tag library from Bording -->
    <taglib>
        <taglib-uri>http://java.agetor.com/jspc</taglib-uri>
        <taglib-location>/WEB-INF/jspc.tld</taglib-location>
    </taglib>
    <!-- Agetor Tag library, may only be used in Anskaffningsportalen -->
    <taglib>
        <taglib-uri>http://java.agetor.com/agetor</taglib-uri>
        <taglib-location>/WEB-INF/inside.tld</taglib-location>
    </taglib>
    <!-- Another mapping used by Agetor Control Center -->
    <taglib>
        <taglib-uri>/inside.tld</taglib-uri>
        <taglib-location>/WEB-INF/inside.tld</taglib-location>
    </taglib>
        <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>
        /META-INF/elfunctions.taglib.xml
    </param-value>
    </context-param>

</web-app>


This was resolved by removing the shale-view component from the Apache shale framework

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号