开发者

I keep getting tomcat HTTP status 404

I'm trying to get an imported project to work and i'm new to JSF. My problem is that when I go to the url of what I think is the correct URL, I just get HTTP Status 404. Can anyone help me figure out what i'm doing wrong? I'm new to JSF so i'm not sure what to even check.

The URL that I tried is http://localhost:8080/adminapp/ccadmin/ccmain.jsf

Folder Structure:

adminapp
-- src/
-- WebContent/
------ ccadmin/
---------- ccmain.jsp
------ WEB-INF/
---------- lib/
---------- classes/
---------- faces-config.xml
---------- web.xml

I think this is the piece of the web.xml file that is important. Let me know if there is anything else that you need to help me with this.

    <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>
        &l开发者_如何学Got;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>

Here's the logs when starting the server:

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


You got a 404 simply because the whole webapp has not been deployed according to the logs.

SEVERE: Context [/adminapp] startup failed due to previous errors

Fix the root cause of the error and then retry.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜