Anwendung nicht laden auf Tomcat 7 server
Ich bin mit einer Anwendung auf meinem Tomcat 7 server. Der server lädt und läuft aber, wenn ich geben Sie http://localhost:8080/ApplicationTest
bekomme ich die folgende Fehlermeldung:
HTTP Status 404 - /ApplicationTest
type Status report
message /ApplicationTest
description The requested resource is not available.
Apache Tomcat/7.0.42
Habe ich umgeschaltet Lage meiner Eigenschaften und in Tomcat Server 7 Einstellungen unter Server Location, die ich geändert es zu "Tomcat-Installationen". Aber es ist immer noch nicht funktioniert, ich habe sogar den server neu installieren. Ich benutze Eclipse Kepler und Tomcat 7, und ein vaadin-web-Anwendung. Ich bekomme keine Fehler in meinem tomcat-logs ist es unter:
Sep 06, 2013 3:32:27 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:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Windows Live\Shared;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Symantec\VIP Access Client\;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files\Java\jre7\bin;C:\MinGW\bin;C:\Program Files (x86)\Gow\bin;C:\Program Files (x86)\WinSCP\;C:\Program Files (x86)\Notepad++\;.
Sep 06, 2013 3:32:27 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TweetApp' did not find a matching property.
Sep 06, 2013 3:32:27 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 06, 2013 3:32:27 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 06, 2013 3:32:27 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 722 ms
Sep 06, 2013 3:32:27 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 06, 2013 3:32:27 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\docs
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\examples
Sep 06, 2013 3:32:29 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Sep 06, 2013 3:32:29 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Sep 06, 2013 3:32:29 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@2e901f36')
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\host-manager
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\manager
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\ROOT
Sep 06, 2013 3:32:29 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 06, 2013 3:32:29 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 06, 2013 3:32:29 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1788 ms
Also meine Frage ist wie behebe ich dieses problem, wie führe ich meine Bewerbung auf meinem tomcat 7 server? Unten ist meine server.xml wenn das hilft:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
--><Server port="8005" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener"/>
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine defaultHost="localhost" name="Catalina">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>
<Context docBase="TweetApp" path="/TweetApp" reloadable="true" source="org.eclipse.jst.jee.server:TweetApp"/></Host>
</Engine>
</Service>
</Server>
Unten ist mein servlet-mapping in meinem web.xml
<!-- ================ Built In Servlet Mappings
========================= -->
<!-- The servlet mappings for the built in servlets defined above. Note --> <!-- that, by default, the CGI and SSI servlets are *not* mapped. You --> <!-- must uncomment these mappings (or add them to your application's own --> <!-- web.xml deployment descriptor) to enable these services -->
<!-- The mapping for the default servlet -->
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- The mappings for the JSP servlet -->
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<!-- The mapping for the SSI servlet --> <!--
<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
-->
<!-- The mapping for the CGI Gateway servlet -->
<!--
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping>
-->
- ja ich nannte es ApplicationTest in der Frage
- Welchen Teil willst du sehen, speziell von der web.xml?
- Ich habe gerade es
- Deine config scheint in Ordnung, aber ein Blick auf das Protokoll, es nicht scheinen, wie Ihre Anwendung wird geladen. Es gibt keine Aussage wie
Deploying web application directory
/ApplicationTest`. Sie haben extrahiert, Ihr Krieg (oder direkt) in den webapps-Ordner? - In welchem Verzeichnis speziell sollte ich schauen?
- Hinweis in den logs haben Sie 5 Aussagen, die
Deploying web application directory ...
. Es sollte ein Verzeichnis sein, inC:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps
für Ihre Anwendung. Ist man dort? - Der Ordner beendet, aber meine Anwendung befindet sich nicht im es
- Dann müssen Sie zum generieren eines
war
Ihrer Anwendung und legen Sie es dort mit dem gleichen Namen wie in Ihremserver.xml
, dh.TweetApp
. So zum BeispielC:\Users\wa7sh\Programs\apache-tomcat-7.0.42\webapps\TweetApp.war
- ich versuche es jetzt
- Ich Tat dies, aber es hat das problem nicht lösen, ich habe sogar neu gestartet, die server gereinigt und die tomcat-Arbeitsverzeichnis
- Ach, läufst du in Eclipse? Haben Sie das Projekt durch Rechtsklick auf den server und tun Hinzufügen/Entfernen?
- Ya, die nicht es aber beheben
- Glaubst du, es hat etwas zu tun mit die folgende Fehlermeldung "WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Einstellung der Eigenschaft 'source' to 'org.eclipse.jst.jee.server:TweetApp' nicht finden, eine passende Immobilie."
- org.eclipse.jst.jee.esrver existiert nicht in meinem .Metadaten/.plugins
Du musst angemeldet sein, um einen Kommentar abzugeben.
Davon aus, dass deine Anwendung heißt
TweetApp
. Machen wir mal etwas Aufräumen.Delete
es.TweetApp
Anwendung.Servers
- Ordner, öffnen Sie die Instanz, und öffnen Sieserver.xml
.<Context>
element für Sie. Verwenden Sie diepath
Attribut zu bauenURL
.Zum Beispiel, wenn
path
ist/TweetApp
Zugriff Ihrer Anwendung auflocalhost:8080/TweetApp/
.Wenn Sie sicherstellen möchten, dass die Anwendung gestartet wird, würde ich empfehlen, registrieren Sie einen
ServletContextListener
und setzen Sie einen log-Anweisungen in seinecontextInitialized()
- Methode, und stellen Sie sicher, dass Ihre gedruckt, wenn Sie den server neu starten.Add and Remove...
- Dienstprogramm, sollten Sie in Ordnung sein.Fand ich heraus, was falsch war mit der Anwendung scheint es, dass mein server war Arbeit, es war mein Antrag, dass war das problem. Ich bin mit der neuesten version von eclipse (kepler) und immer, wenn ich neue erstellen vaadin web-Anwendung wird standardmäßig der Konfiguration zu "Vaadin 7, Java 6, Servlets 3.0", und diese Konfiguration aus irgendeinem Grund nicht automatisch erstellen web.xml Datei im WEB-INF-Ordner. Um dies zu beheben wählte ich "Vaadin 7, Java 6, Servlet 2.4", die automatisch erstellt die web.xml für mich. Es gibt vermutlich eine bessere Lösung, aber jetzt funktioniert hat. Wenn jemand Beiträge eine bessere Lösung, die ich wählen Sie Ihre Antwort.
org.eclipse.wst.common.project.facet.core.xml
die Linie<installed facet="jst.web" version="3.0" />
angegeben eine andere version, als Ihre Anwendung erforderlich. Dies wirft einen Fehler in eclipse, aber der Benutzer wird nicht benachrichtigt, es sei denn, er sieht in der "Error Log"-AnsichtIch vor dem gleichen problem, ich habe unten und es funktionierte.
1)ich erfrischt mein Projekt in eclipse und dann Hinzugefügt, dass die war-Datei im tomcat-und dann hat es geklappt.