`

intellj maven springmvc jetty 出错

 
阅读更多

"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 SelectChannelConnector@0.0.0.0: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  还不一样

分享到:
评论

相关推荐

    maven springMVC

    在IntelliJ IDEA(简称IDEA)这个流行的Java开发集成环境中,使用Maven来创建SpringMVC项目是常见的实践。 首先,我们需要了解Maven。Maven是一个项目管理和综合工具,它通过配置文件pom.xml管理项目的依赖关系,...

    SpringMVC+Maven DEMO

    1. **新建Maven项目**:使用IDE如IntelliJ IDEA或Eclipse,选择Maven项目模板。 2. **配置pom.xml**:添加SpringMVC和相关依赖,如Spring Core、Spring Web、Spring MVC、Jackson等。 3. **编写Controller**:创建...

    idea下maven搭建springmvc简易模板

    本教程将详细介绍如何在IntelliJ IDEA(简称Idea)环境下利用Maven来搭建一个基本的Spring MVC项目,作为简易模板,方便快速转换为自定义项目。 **一、Maven简介** Maven是一个强大的项目管理工具,它通过POM...

    idea+springmvc+maven搭建

    7. **运行项目**:在Idea中,可以通过Maven的生命周期命令如`mvn install`来编译和打包项目,然后通过内置的Tomcat或Jetty服务器运行项目。 8. **测试**:在浏览器中输入URL,查看Spring MVC是否成功处理了请求。 ...

    嵌入jetty的springMVC可运行jar的REST+

    标题中的“嵌入jetty的springMVC可运行jar的REST+”指的是使用Jetty作为嵌入式服务器来运行一个包含Spring MVC的Java Web应用程序,该应用提供了RESTful API服务。这种架构允许开发者将Web服务器与应用代码打包成...

    Maven搭建SSM框架Demo(IntellIJ-idea版)

    本示例“Maven搭建SSM框架Demo(IntelliJ-idea版)”旨在为初学者提供一个清晰的起点,了解如何利用Maven、Spring、SpringMVC和Mybatis这四大核心组件来创建一个完整的Web项目。下面将详细阐述这些知识点。 首先,...

    IDEA整合SpringMVC开发框架(maven+springboot)Demo

    标题"IDEA整合SpringMVC开发框架(maven+springboot)Demo"表明这是一个基于IntelliJ IDEA(IDEA)的项目,该项目集成了SpringMVC,一个流行的Java Web开发框架,同时利用了Maven作为构建工具,并结合了Spring Boot...

    SSM整合图书管理系统 idea+Maven+Spring+SpringMVC+Mybatis

    4. **IntelliJ IDEA**:作为开发环境,IntelliJ IDEA提供了丰富的功能,如代码自动完成、错误检测、重构工具等,极大地提升了开发效率。对于SSM项目,IDEA支持Maven插件,可以方便地导入、构建和运行项目。 5. **...

    Spring MVC 项目Demo

    【Spring MVC 项目Demo】是一个基于Java开发的Web应用程序示例,它利用了Spring MVC、MyBatis、Maven、Jetty服务器以及IntelliJ IDEA作为集成开发环境,并且依赖MySQL数据库来存储数据。这个项目旨在展示如何将这些...

    基于SpringMVC+Hibernate实现的在线购物商城

    4. **Eclipse/IntelliJ IDEA**:常用的Java开发IDE,支持SpringMVC和Hibernate的集成。 5. **Tomcat/Jetty**:应用服务器,运行Java Web应用。 **在线购物商城功能** 1. **用户模块**:注册、登录、个人信息管理等...

    idea+maven+ssm

    通过Maven的pom.xml文件配置SSM的版本和依赖,然后创建Spring的配置文件(如applicationContext.xml、spring-mvc.xml)和MyBatis的配置文件(mybatis-config.xml),完成数据库连接、数据源、Mapper接口等的配置,...

    Mybatis-SpringMVC在线考试系统源码

    开发过程中,开发者通常会使用IDE如IntelliJ IDEA或Eclipse,配合Maven或Gradle进行项目构建。部署时,需要将项目打包成WAR或EAR文件,然后上传到Tomcat、Jetty等应用服务器上运行。 **6. 学习价值** 对于初学者,...

    ssm框架结合maven整合web项目源码

    7. **运行与调试**:在IDEA中,可以配置Tomcat或Jetty等服务器,然后通过Maven的`install`和`tomcat:run`目标来构建和运行项目。同时,IDEA的调试功能可以帮助开发者进行单元测试和断点调试。 8. **最佳实践**:在...

    基于SpringMVC的JAVA论坛(J2EE BBS 毕业设计)

    在实现过程中,开发者还需要熟悉**Maven**或**Gradle**等构建工具,用来管理项目依赖,构建和打包应用。同时,使用IDE如IntelliJ IDEA或Eclipse进行开发,可以提高效率。 此外,项目可能还涉及到**...

    基于SpringMVC+Spring+MyBatis (SSM) 架构的高效率便捷开发框架源码+项目说明.zip

    * IntelliJ IDEA 2017.2.5 / Eclipse 4.6.1 * Navicat Premium 11.1.12 * Maven 3.3.9 * Jetty 9.4.6.v20170531 / Tomcat 9.0.1 ## 二、技术选型(Technology) #### 1.服务端技术(Server) 名称 | 版本号 | 网址 ...

    IDEA整合Maven+SSM框架.zip

    IntelliJ IDEA(简称IDEA)是一款强大的Java集成开发环境,它支持对Maven的无缝集成,使得SSM框架的整合变得更为便捷。下面我们将详细探讨如何在IDEA中整合这三个组件以及相关知识点。 1. **Spring框架**:Spring是...

    Spring+Mybatis+Springmvc框架项目实战整合

    1. **环境搭建**:包括安装JDK、设置环境变量,配置IDE(如IntelliJ IDEA或Eclipse),导入SSM相关jar包或使用Maven/Gradle管理依赖。 2. **Spring配置**:创建Spring的配置文件,配置bean,实现DI和AOP。例如,...

    SpringMVC开发的个人主页网站

    在开发过程中,开发者可能会使用IDE如IntelliJ IDEA或Eclipse,配合Maven或Gradle构建工具管理项目依赖和构建流程。测试方面,可以使用JUnit进行单元测试,确保各模块功能的正确性。最后,项目通过Tomcat或Jetty等...

    springMVC包.zip

    Spring MVC 是一个基于Java的轻量级Web应用框架,它属于...在实际开发中,还需要结合IDE(如Eclipse或IntelliJ IDEA)、构建工具(如Maven或Gradle)以及Web服务器(如Tomcat或Jetty)来完成整个项目的设置和部署。

Global site tag (gtag.js) - Google Analytics