初学springmvc,照视频做了个helloworld,结果弄了半天还是解决不了错误

dfsgfsgsg 发布于 2016/08/06 20:35
阅读 859
收藏 0

我在index.jsp文件下创建一个调用Helloworld.java里打印helloworld方法的超链接,然后success.jsp文件上打印字符串,我的Helloworld.java,web.xml.默认路径下的servlet也配置好了,贴上异常:

八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:myspringmvc' did not find a matching property.
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/9.0.0.M9
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jul 4 2016 18:22:47 UTC
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         9.0.0.0
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jdk1.8.0_92\jre
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_92-b14
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         E:\eclipse工作文件\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         C:\Users\admin\apache-tomcat-9.0.0.M9
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\eclipse工作文件\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=C:\Users\admin\apache-tomcat-9.0.0.M9
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=E:\eclipse工作文件\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=C:\Users\admin\apache-tomcat-9.0.0.M9\endorsed
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
八月 06, 2016 8:02:10 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: 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\jdk1.8.0_92\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_92/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_92/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_92/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.8.0_92\bin;D:\apache-maven-3.3.9\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;D:\ATI.ACE\Core-Static;D:\bin;D:\bin;%MAVEN_HOME%\bin;C:\Users\admin\Desktop;;.
八月 06, 2016 8:02:10 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 06, 2016 8:02:10 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 06, 2016 8:02:10 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1075 ms
八月 06, 2016 8:02:10 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 06, 2016 8:02:10 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/9.0.0.M9
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.descriptor.DigesterFactory locationFor
警告: The XML schema [web-app_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.descriptor.DigesterFactory locationFor
警告: The XML schema [web-fragment_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.descriptor.DigesterFactory locationFor
警告: The XML schema [web-common_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
八月 06, 2016 8:02:10 下午 org.apache.tomcat.util.descriptor.DigesterFactory locationFor
警告: The XML schema [javaee_8.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
八月 06, 2016 8:02:12 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 06, 2016 8:02:12 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
八月 06, 2016 8:02:12 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'springDispatcherServlet'
八月 06, 2016 8:02:12 下午 org.springframework.web.servlet.FrameworkServlet initServletBean
信息: FrameworkServlet 'springDispatcherServlet': initialization started
八月 06, 2016 8:02:12 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace 'springDispatcherServlet-servlet': startup date [Sat Aug 06 20:02:12 CST 2016]; root of context hierarchy
八月 06, 2016 8:02:13 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/springDispatcherServlet-servlet.xml]
八月 06, 2016 8:02:13 下午 org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
信息: Mapped URL path [/helloworld] onto handler 'helloworld'
八月 06, 2016 8:02:13 下午 org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
信息: Mapped URL path [/helloworld.*] onto handler 'helloworld'
八月 06, 2016 8:02:13 下午 org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
信息: Mapped URL path [/helloworld/] onto handler 'helloworld'
八月 06, 2016 8:02:13 下午 org.springframework.web.servlet.FrameworkServlet initServletBean
信息: FrameworkServlet 'springDispatcherServlet': initialization completed in 1023 ms
八月 06, 2016 8:02:13 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [http-nio-8080]
八月 06, 2016 8:02:13 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [ajp-nio-8009]
八月 06, 2016 8:02:13 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 3234 ms
hello world
八月 06, 2016 8:02:17 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springDispatcherServlet] in context with path [/myspringmvc] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getMapping()Ljavax/servlet/http/Mapping;] with root cause
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getMapping()Ljavax/servlet/http/Mapping;
at org.apache.catalina.core.ApplicationHttpRequest.setRequest(ApplicationHttpRequest.java:707)
at org.apache.catalina.core.ApplicationHttpRequest.<init>(ApplicationHttpRequest.java:105)
at org.apache.catalina.core.ApplicationDispatcher.wrapRequest(ApplicationDispatcher.java:920)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:358)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:266)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1225)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1012)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:822)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)


hello world
八月 06, 2016 8:09:32 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springDispatcherServlet] in context with path [/myspringmvc] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getMapping()Ljavax/servlet/http/Mapping;] with root cause
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getMapping()Ljavax/servlet/http/Mapping;
at org.apache.catalina.core.ApplicationHttpRequest.setRequest(ApplicationHttpRequest.java:707)
at org.apache.catalina.core.ApplicationHttpRequest.<init>(ApplicationHttpRequest.java:105)
at org.apache.catalina.core.ApplicationDispatcher.wrapRequest(ApplicationDispatcher.java:920)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:358)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:266)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1225)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1012)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:822)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:807)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)


求教!

加载中
0
mark35
mark35
一坨日志……
0
霖vv
霖vv
没匹配到 那个方法。  路径有错误吧 。     
0
酷酷的就
酷酷的就
springMVC 去官网找对应的showcase , 各种用法都是全的. 
0
咕嘟代码
咕嘟代码
路径配置有问题,找不到方法;建议多看看文档
0
你不懂的吧
你不懂的吧

把配置贴出来啊

返回顶部
顶部