我正在尝试将现有的 JSF 1.2 应用程序从 Jboss 4.2 迁移到 Wildfly 13。我还从 jdk1.5 迁移到了 jdk10。我正在制作具有以下层次结构的 ear 文件:
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 文件放在独立/部署文件夹中并启动 wildfly 时,它不会在 server.log 中给出任何错误。但是当我点击应用程序 url 时,它给了我 404。
完整的服务器日志可在以下位置获得: 服务器日志