(三十一)用ecplise SpringMVC环境搭建遇到的问题

1.首先新建一个项目工程new-Dynamic Web Project

①遇到问题:eclipse没有(添加)”Dynamic Web Project”选项的方法

解决方法:https://blog.csdn.net/u011070171/article/details/50018801

②JDK版本最小1.6

修改:https://jingyan.baidu.com/article/ed2a5d1f6f4ea309f6be17b9.html

2.JSP文档

①The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

解决方法:https://blog.csdn.net/dietime1943/article/details/75127417

②在ecplise安装Tomcat过程中出现next置灰问题,查了三小时资料。。。。

help-->installNewNewsoftware 在work里面输入http://download.eclipse.org/releases/kepler

然后在出现的扩展里依次展开Web,XML, Java EE and OSGi Enterprise Development ->JST Server AdaptersExtensions

选择JST Server AdaptersExtensions,然后next

3,将项目部署到Tomcat中

ecplise:https://blog.csdn.net/longyuhome/article/details/8362635

4. 在ecplise中启动Tomcat出错:Failed to start component [StandardEngine[Catalina]

解决方法:导入的jar包冲突

5.The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

解决方法:

去掉勾选

6.报错:java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

解决方法:引入spring-webmvc.jar包

7.复制web项目,依然引用原项目

解决方法:右键项目--properties--web project settings 写本项目名称

       修改工程下的.setting文件夹下的org.eclipse.wst.common.component文件;

       修改工作空间下的.metadata下的.plugin下的org.eclipse.wst.server.core下的server.xml的list key值。
7.spring配置出现前缀 "tx" 未绑定、前缀 "mvc" 未绑定等情况

解决方法:

在spring.xml中bean中加入命名空间

xmlns:mvc="http://www.springframework.org/schema/mvc"
http://www.springframework.org/schema/mvc 
http://www.springframework.org/schema/mvc/spring-mvc.xsd

 

 

 

 

 

 

posted @ 2019-05-17 21:16  测试开发分享站  阅读(148)  评论(0编辑  收藏  举报