将JSF1.2应用程序从Jboss 4.2迁移到Wildfly 13

时间:2018-07-26 13:47:53

标签: jsf-1.2 wildfly-13

我正在尝试将现有的JSF 1.2应用程序从Jboss 4.2迁移到Wildfly13。我也已经从jdk1.5迁移到jdk10。我正在按照以下层次构建耳朵文件:

ear
 /lib ---all jars in it
 /META-INF
       /application.xml
       /jboss-deployment-structure.xml
       /MANIFEST.MF
 /EOSEJB.jar
 /EOSWeb.war

我的jboss-deployment-structure.xml看起来像:

<deployment>
        <exclude-subsystems>  
             <subsystem name="jsf" />
        </exclude-subsystems>
        <exclusions>
            <module name="com.sun.jsf-impl" />
            <module name="javax.faces.api" />
            <module name="org.jboss.as.jsf" />
            <module name="org.jboss.as.jsf-injection" />
            <module name="org.apache.commons.beanutils" />
            <module name="org.apache.commons.cli" />
            <module name="org.apache.commons.codec" />
            <module name="org.apache.commons.collections" />
            <module name="org.apache.commons.io" />
            <module name="org.apache.commons.lang" />
            <module name="org.apache.commons.lang3" />
            <module name="org.apache.commons.logging" />
            <module name="org.apache.commons.pool" />
            <module name="org.hibernate" slot="main" />
        </exclusions>
    </deployment>

<sub-deployment name="EOSWeb.war">中的排除项相同 我在jboss 4.2中使用的所有jsf jar现在都在ear / lib中。

我的web.xml

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

    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>  
        <param-name>org.apache.myfaces.COMPRESS_STATE_IN_CLIENT</param-name>  
        <param-value>true</param-value> 
    </context-param>

    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jsp</param-value>
    </context-param>

    <!-- context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param-->

    <!-- context-param>
        <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
        <param-value>mojarra-1.2_15</param-value>
    </context-param-->

    <context-param>
        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>
            /WEB-INF/faces-config.xml,
            /WEB-INF/faces-config-eos.xml,
            /WEB-INF/faces-config-pda.xml,
            /WEB-INF/faces-config-referral.xml      
        </param-value>
    </context-param>


    <!-- SERVET DEFINITIONS -->
    <servlet>
        <servlet-name>PDF Servlet</servlet-name>
        <servlet-class>org.ukt.common.PDFServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>EOS Faces Servlet</servlet-name>
        <!-- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> -->
        <servlet-class>org.ukt.eos.util.EOSCustomFacesServlet</servlet-class>
        <init-param>
              <param-name>errorPage</param-name>
              <param-value>/faces/jsp/ErrorPage.jsp</param-value>
         </init-param>
        <load-on-startup>-1</load-on-startup>
    </servlet>


    <!-- SERVET MAPPING DEFINITIONS -->
    <servlet-mapping>
        <servlet-name>PDF Servlet</servlet-name>
        <url-pattern>/_donor_summary/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>EOS Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>


    <!-- WELCOME FILE DEFINITION -->
    <welcome-file-list>
        <welcome-file>jsp/login.jsp</welcome-file>
    </welcome-file-list>

    <!-- FILTER DEFINITION -->
    <filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <description>Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB</description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
        </init-param>
        <init-param>
            <description>
                Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10
                - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
        </init-param>
    </filter>

    <!-- FILTER MAPPING DEFINITION -->
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

<filter>
     <filter-name>SessionHandlerFilter</filter-name>
     <filter-class>org.ukt.eos.security.filters.SessionHandlerFilter</filter-class>
     <init-param>
        <param-name>session_timeout_page</param-name>
        <param-value>/faces/jsp/login.jsp</param-value>
     </init-param>
</filter>

<filter-mapping>
    <filter-name>SessionHandlerFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>

<filter>
    <filter-name>PDFRendererFilter</filter-name>
    <filter-class>org.ukt.eos.pdf.filter.PDFRendererFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>PDFRendererFilter</filter-name>
    <url-pattern>/_donor_summary/*</url-pattern>
</filter-mapping>

<!-- Filter added for security (pen test) defects
<filter>
    <filter-name>CrossSiteScriptingFilter</filter-name>
    <filter-class>org.ukt.eos.security.filters.CrossSiteScriptingFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>CrossSiteScriptingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
-->

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


    <error-page>
        <error-code>500</error-code>
        <location>/EOSWeb/faces/jsp/ErrorPage.jsp</location>
    </error-page>

    <listener>
        <listener-class>
        org.ukt.eos.security.filters.EOSSessionListener
        </listener-class>
    </listener>
    <listener> 
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class> 
    </listener>

</web-app>

当我现在将我的Ear文件放置在Standalone / deployment文件夹中并启动wildfly时,server.log中没有任何错误。但是,当我点击应用程序网址时,它会显示404。

完整的服务器日志位于: server logs

0 个答案:

没有答案