und WARNUNG: Beim Festlegen der Eigenschaft „source“ auf „org.eclipse.jst.jee.server:appname“ wurde keine passende Eigenschaft gefunden
Beide sagen, dass dies kein Fehler ist und Sie ihn ignorieren können. Sie sagen auch, dass Sie Ihren localhost:8080/(aplication-context) angeben müssen.
Aber ich kann den 404-Fehler nicht beseitigen und bekomme keine Seite. Ich habe auch versucht, ein Webprojekt ohne Maven zu erstellen. Ich kann es immer noch nicht herausfinden. Bitte helfen Sie mir, das durchzustehen.
Hier ist mein Protokoll:
Code: Select all
Tem 15, 2014 12:58:57 AM 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 (x86)\Java\jdk1.7.0_60\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)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Broadcom\Broadcom 802.11\Driver;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;.
Tem 15, 2014 12:58:57 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Tem 15, 2014 12:58:57 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Tem 15, 2014 12:58:57 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 429 ms
Tem 15, 2014 12:58:57 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Tem 15, 2014 12:58:57 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Tem 15, 2014 12:58:57 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\Serhat Can\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\SpitterWebMaven.xml
Tem 15, 2014 12:58:57 AM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpitterWebMaven' did not find a matching property.
Tem 15, 2014 12:58:58 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor C:\Users\Serhat Can\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\SpitterWebMaven.xml has finished in 85 ms
Tem 15, 2014 12:58:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Tem 15, 2014 12:58:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Tem 15, 2014 12:58:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 486 ms
Code: Select all
SpitterWebMaven
contextConfigLocation
classpath:spring/application-config.xml
org.springframework.web.context.ContextLoaderListener
dispatcherServlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
/WEB-INF/mvc-config.xml
1
dispatcherServlet
/
Code: Select all
Code: Select all
Code: Select all
4.0.0
org.springframework.samples.service.service
SpitterWebMaven
0.0.1-SNAPSHOT
war
1.6
UTF-8
UTF-8
2.2
1.2
2.5
3.2.3.RELEASE
4.2.1.Final
1.0.13
1.7.5
4.11
org.springframework
spring-webmvc
${spring-framework.version}
org.springframework
spring-context
${spring-framework.version}
org.springframework
spring-jdbc
${spring-framework.version}
org.springframework
spring-context-support
${spring-framework.version}
org.springframework
spring-orm
${spring-framework.version}
javax.inject
javax.inject
1
javax.servlet
jstl
${jstl.version}
javax.servlet
servlet-api
${servlet.version}
provided
javax.servlet.jsp
jsp-api
${jsp.version}
provided
org.springframework
spring-tx
${spring-framework.version}
org.aspectj
aspectjlib
1.6.2
org.aspectj
aspectjweaver
1.8.1
org.slf4j
slf4j-api
${slf4j.version}
compile
ch.qos.logback
logback-classic
${logback.version}
runtime
mysql
mysql-connector-java
5.1.31
org.hibernate
hibernate-entitymanager
${hibernate.version}
org.apache.commons
commons-lang3
3.3.2
org.apache.commons
commons-dbcp2
2.0.1
org.springframework
spring-test
${spring-framework.version}
test
junit
junit
${junit.version}
test
org.mockito
mockito-all
1.9.5
javax.validation
validation-api
1.1.0.Final
Mein Hallo-Controller (Ich versuche, einen sehr einfachen Controller zu verwenden, um zu sehen, ob er funktioniert. Außerdem habe ich hello.jsp in der WEB-INF->Ansicht):
Code: Select all
@Controller
public class HelloWorldController {
@RequestMapping("/hello")
public ModelAndView helloWorld() {
String message = "Hello World, Spring 3.0!";
return new ModelAndView("hello", "message", message);
}
}
Ein weiterer Gedanke, den ich hinzufügen möchte, ist, dass beim ersten Erstellen des Projekts die Schaltfläche „Auf dem Server ausführen“ nicht angezeigt wurde und ich Java und Dynamic Web Project ausgewählt habe, um die Schaltfläche „Auf dem Server ausführen“ anzuzeigen, nachdem ich recherchiert hatte, wie das geht.
Mobile version