解决eclipse启动tomcat时不能加载web项目的问题
作者:持盾的紫眸 时间:2023-11-15 14:45:01
问题描述:
eclipse启动tomcat时,不能加载web项目,但是把war包丢进tomcat的webapps下是能正常运行的
解决方式:
右键项目——打开Properties——找到Deployment Assembly——将WebContent修改成你的项目webapp路径
eclipse与tomcat绑定成功后却无法访问自己的web项目下的HTML文件
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Mypro' did not find a matching property.
在server上运行给出如上警告,页面也无法访问。
可能原因:
将自己的工程run on server 后,默认寻找的是WebContent下的index.html的欢迎页面,所以当你的WebContent下没有index.html文件的话,就会报404.但这并不妨碍你在地址栏访问自己的Java项目。
所以将WebContent下用于试验的html文件命名为index.html或者将web.xml内的index.html改为你自定义的文件名就ok啦。
这只是刚刚搭建好环境用HTML文件进行测试用到,运行Java项目不用考虑这些。以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
来源:https://blog.csdn.net/zimou5581/article/details/82780550
标签:eclipse,tomcat,加载,web项目
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
C#自定义音乐播放器进度条
2023-07-04 21:54:05
![](https://img.aspxhome.com/file/2023/9/126089_0s.jpg)
Android调用系统图库获取图片的方法
2023-09-23 04:13:02
![](https://img.aspxhome.com/file/2023/8/139628_0s.jpg)
C#开发微信门户及应用(4) 关注用户列表及详细信息管理
2023-06-05 07:40:43
![](https://img.aspxhome.com/file/2023/8/116508_0s.png)
map实现按value升序排序
2022-10-23 23:13:49
SpringCloud Edgware.SR3版本中Ribbon的timeout设置方法
2023-03-07 10:45:46
Lucene 索引删除策略源码解析
2023-11-21 00:11:01
![](https://img.aspxhome.com/file/2023/5/65215_0s.jpg)
微信js sdk invalid signature签名错误问题的解决方法分析
2021-07-26 02:26:47
selenium高效应对Web页面元素刷新的实例讲解
2022-12-04 08:17:33
C# 通过反射获取类型的字段值及给字段赋值的操作
2021-11-14 13:30:23
Java Kryo,Protostuff,Hessian序列化方式对比
2023-10-24 12:41:15
![](https://img.aspxhome.com/file/2023/0/68500_0s.png)
springboot实现在工具类(util)中调用注入service层方法
2021-06-17 20:02:51
![](https://img.aspxhome.com/file/2023/6/60616_0s.png)
高吞吐、线程安全的LRU缓存详解
2021-10-01 01:40:28
![](https://img.aspxhome.com/file/2023/1/104201_0s.png)
基于java构造方法Vector删除元素源码分析
2023-11-25 14:54:45
![](https://img.aspxhome.com/file/2023/8/60238_0s.png)
Java Spring之@Async原理案例详解
2023-05-31 17:13:15
C#编程实现QQ界面的方法
2023-02-05 23:35:45
解决Java执行Cmd命令出现的死锁问题
2023-06-15 09:54:56
详解c# 中的DateTime
2023-05-15 01:48:58
![](https://img.aspxhome.com/file/2023/2/100192_0s.png)
Android使用ContentProvider实现查看系统短信功能
2023-12-16 23:55:46
![](https://img.aspxhome.com/file/2023/3/98663_0s.jpg)
Java语法基础之函数的使用说明
2022-07-20 15:55:09
SpringBoot实现启动类的存放位置
2021-12-02 21:13:21
![](https://img.aspxhome.com/file/2023/8/98118_0s.png)