Tomcat - Die angeforderte Ressource () ist nicht verfügbar

Ich versuche, eine struts-tutorial arbeiten, aber ich komme gegen die folgende Fehlermeldung, wenn ich versuche, führen Sie die Datei Tomcat.

The requested resource () is not available.

Tomcat-Log-Ausgang:

Aug 29, 2012 9:55:37 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GTK2-Runtime\bin;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;.
Aug 29, 2012 9:55:37 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:StrutsExample1' did not find a matching property.
Aug 29, 2012 9:55:37 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 29, 2012 9:55:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1367 ms
Aug 29, 2012 9:55:37 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 29, 2012 9:55:37 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Aug 29, 2012 9:55:38 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 29, 2012 9:55:39 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 29, 2012 9:55:39 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/56  config=null
Aug 29, 2012 9:55:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1468 ms

Meine web.xml Datei:

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

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
 </servlet>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

Struts-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
          "http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

    <form-beans>
        <form-bean name="helloWorldForm" type="com.vaannila.form.HelloWorldForm"/>
    </form-beans>

    <global-forwards>
        <forward name="helloWorld" path="/helloWorld.do"/>
    </global-forwards>

    <action-mappings>
        <action path="/helloWorld" type="com.vaannila.action.HelloWorldAction" name="helloWorldForm">
            <forward name="success" path="/helloWorld.jsp" />
        </action>
    </action-mappings>

</struts-config>

Ich bin mit Tomcat als plug-in für Eclipse.

Wo hast du die Meldung "Die angeforderte Ressource nicht verfügbar ist?" Wenn Sie versuchen, Zugriff auf die Anwendung über einen browser?
Haben Sie schalten Sie die Protokollierung von bis zu DEBUGGEN und überprüfen Sie die Protokolle auf startup? Es ist fast schon etwas in einer config-Datei, oder ausgelöst durch eine config-Datei, wie eine fehlende Klasse/jar, etc.
Ja ich habe es bekommen, wenn Sie versuchen, zum anzeigen der Datei in einem browser.
<pedantry>Sie nicht "anzeigen einer Datei in den browser", die Sie anfordern einer Ressource. Kleiner Punkt.</pedantry>
Stellen Sie sicher, schauen in alle log-Dateien im $TOMCAT_HOME/logs, einschließlich catalina.aus und localhost*.log. In fast allen Fällen finden Sie einige stack-trace oder Hinweis in den logs, wenn der Umgang mit Problemen wie diesem.

InformationsquelleAutor Colin747 | 2012-08-29

Schreibe einen Kommentar