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

本文围绕在Eclipse中新建Dynamic Web Project项目展开,介绍了项目创建、JSP文档配置、Tomcat安装与部署项目过程中遇到的问题及解决办法,如eclipse无相关选项、JDK版本修改、Tomcat启动出错等,还提及了spring配置的问题处理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

解决方法:https://blog.youkuaiyun.com/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.youkuaiyun.com/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.youkuaiyun.com/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

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值