我正在努力让一个导入的项目工作,我是JSF的新手。我的问题是,当我转到我认为正确的URL的URL时,我只获得HTTP状态404.任何人都可以帮我弄清楚我做错了什么?我是JSF的新手,所以我不确定要检查什么。
我尝试过的网址是http://localhost:8080/adminapp/ccadmin/ccmain.jsf
文件夹结构:
adminapp
-- src/
-- WebContent/
------ ccadmin/
---------- ccmain.jsp
------ WEB-INF/
---------- lib/
---------- classes/
---------- faces-config.xml
---------- web.xml
我认为这是重要的web.xml文件。如果还有其他任何事情需要帮助我,请告诉我。
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<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>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<display-name>
Apache-Axis Servlet</display-name>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>
org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet>
<display-name>
Axis Admin Servlet</display-name>
<servlet-name>AdminServlet</servlet-name>
<servlet-class>
org.apache.axis.transport.http.AdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AdminServlet</servlet-name>
<url-pattern>/servlet/AdminServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
<welcome-file>/index.html</welcome-file>
</welcome-file-list>
<resource-ref id="IngresResourceRef">
<description>Ingres Reference</description>
<res-ref-name>jdbc/ingresRef</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref id="ResourceRef_1207169053212">
<res-ref-name>jdbc/edbcRef</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<description>DB2 Reference</description>
<res-ref-name>jdbc/db2Ref</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
这是启动服务器时的日志:
Aug 3, 2011 3:56:59 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\IBM\SDP\jdk\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\sybase15_0_7\OCS-15_0\bin;C:\sybase15_0_7\OCS-15_0\dll;C:\sybase15_0_7\OCS-15_0\lib3p;C:\sybase15_0_7\DataAccess\ADONET\dll;C:\sybase15_0_7\DataAccess\ODBC\dll;C:\sybase15_0_7\DataAccess\OLEDB\dll;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\QuickTime\QTSystem\
Aug 3, 2011 3:56:59 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 3, 2011 3:56:59 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 537 ms
Aug 3, 2011 3:56:59 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 3, 2011 3:56:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Aug 3, 2011 3:57:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in dependencyCheck
Throwable occurred: java.util.zip.ZipException: oversubscribed literal/length tree
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
at java.util.jar.JarInputStream.read(JarInputStream.java:189)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:230)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:270)
at java.io.BufferedInputStream.read(BufferedInputStream.java:329)
at java.util.jar.JarInputStream.getBytes(JarInputStream.java:100)
at java.util.jar.JarInputStream.<init>(JarInputStream.java:77)
at java.util.jar.JarInputStream.<init>(JarInputStream.java:55)
at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:373)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:184)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4154)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Aug 3, 2011 3:57:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Aug 3, 2011 3:57:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/adminapp] startup failed due to previous errors
Aug 3, 2011 3:57:01 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/adminapp] has not been started
Aug 3, 2011 3:57:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 3, 2011 3:57:01 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 3, 2011 3:57:01 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Aug 3, 2011 3:57:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1469 ms
答案 0 :(得分:2)
你得到一个404只是因为整个webapp根据日志部署了不。
SEVERE: Context [/adminapp] startup failed due to previous errors
修复错误的根本原因,然后重试。