"C:\Program Files\Java\jdk1.6.0_10\bin\java" -Dmaven.home=E:\maven\apache-maven-3.0.5 -Dclassworlds.conf=E:\maven\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 13.1.4\bin" -Dfile.encoding=UTF-8 -classpath "E:\maven\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;C:\Program Files\JetBrains\IntelliJ IDEA 13.1.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=13.1.4 -s E:\maven\apache-maven-3.0.5\conf\settings.xml clean jetty:run -DskipTests -P pom.xml
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.smart:chapter1:war:3.2.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 94, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building 第一章示例 3.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ chapter1 ---
[INFO] Deleting D:\actionSpring\chapter\chapter1\target
[INFO]
[INFO] >>> maven-jetty-plugin:6.1.5:run (default-cli) @ chapter1 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ chapter1 ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ chapter1 ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 7 source files to D:\actionSpring\chapter\chapter1\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ chapter1 ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\actionSpring\chapter\chapter1\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ chapter1 ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to D:\actionSpring\chapter\chapter1\target\test-classes
[INFO]
[INFO] <<< maven-jetty-plugin:6.1.5:run (default-cli) @ chapter1 <<<
[INFO]
[INFO] --- maven-jetty-plugin:6.1.5:run (default-cli) @ chapter1 ---
[INFO] Configuring Jetty for project: 第一章示例
[INFO] Webapp source directory = D:\actionSpring\chapter\chapter1\src\main\webapp
[INFO] web.xml file = D:\actionSpring\chapter\chapter1\src\main\webapp\WEB-INF\web.xml
[INFO] Classes = D:\actionSpring\chapter\chapter1\target\classes
2014-10-25 15:21:58.816::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /chapter1
[INFO] Tmp directory = D:\actionSpring\chapter\chapter1\target\work
[INFO] Web defaults = jetty default
[INFO] Web overrides = none
[INFO] Webapp directory = D:\actionSpring\chapter\chapter1\src\main\webapp
[INFO] Starting jetty 6.1.5 ...
2014-10-25 15:21:58.899::INFO: jetty-6.1.5
2014-10-25 15:21:58.066::INFO: No Transaction manager found - if your webapp requires one, please configure one.
2014-10-25 15:21:58.176:/chapter1:INFO: Initializing Spring root WebApplicationContext
2014-10-25 15:21:58 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
2014-10-25 15:21:58 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing Root WebApplicationContext: startup date [Sat Oct 25 15:21:58 CST 2014]; root of context hierarchy
2014-10-25 15:21:58 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
2014-10-25 15:21:59 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3dd246: defining beans [loginLogDao,userDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,userService,datasource,jdbcTemplate,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,serviceMethod,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,txAdvice,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
2014-10-25 15:21:59 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization completed in 1115 ms
2014-10-25 15:21:59.446:/chapter1:INFO: Initializing Spring FrameworkServlet 'springMvc'
2014-10-25 15:21:59 org.springframework.web.servlet.FrameworkServlet initServletBean
信息: FrameworkServlet 'springMvc': initialization started
2014-10-25 15:21:59 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace 'springMvc-servlet': startup date [Sat Oct 25 15:21:59 CST 2014]; parent: Root WebApplicationContext
2014-10-25 15:21:59 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [springMvc-servlet.xml]
2014-10-25 15:22:00 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12f9ee1: defining beans [loginController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,viewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@3dd246
2014-10-25 15:22:00 org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod
信息: Mapped "{[/admin/login.html],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.ModelAndView com.smart.web.LoginController.login()
2014-10-25 15:22:00 org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod
信息: Mapped "{[/admin/loginCheck.html],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.smart.web.LoginController.loginCheck(javax.servlet.http.HttpServletRequest,com.smart.web.LoginCommand)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2014-10-25 15:22:00 org.springframework.web.servlet.FrameworkServlet initServletBean
信息: FrameworkServlet 'springMvc': initialization completed in 558 ms
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 3 seconds.
2014-10-25 15:22:00.021::INFO: Started [email protected]:8088
2014-10-25 15:22:07.945::WARN: /chapter1/admin/login.html
javax.servlet.ServletException: Could not resolve view with name 'login' in servlet with name 'springMvc'
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1190)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
解决方法是
<property name="prefix" value="/WEB-INF/jetx/"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
而不是
<property name="prefix" value="/WEB-INF/jetx"/>
<property name="prefix" value="/WEB-INF/jsp"/>
用intellj 和myeclispe 还不一样