输入http://localhost:8080/test/出错,但是http://localhost:8080/test/myjsp.jsp可以打开

wutongyeluo 2009-01-15 10:00:10
配置:Eclipse3.1+myeclipse4.1+tomcat5.5 输入http://localhost:8080/test/,就报下面的错误,但是输入http://localhost:8080/test/myjsp.jsp就正确显示,为什么?我看书上说http://localhost:8080/test/也能显示。是不是哪里配错了?请教各位大侠,谢谢!

HTTP Status 404 - /test/

--------------------------------------------------------------------------------

type Status report

message /test/

description The requested resource (/test/) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.27
...全文
1043 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wutongyeluo 2009-02-10
  • 打赏
  • 举报
回复
THANK YOU VERY MUCH!!
Jacky_Zhu_1983 2009-01-15
  • 打赏
  • 举报
回复
他把myjsp.jsp放在test下所以要在前面加上
应该这样...
<welcome-file-list>
<welcome-file>test/myjsp.jsp</welcome-file>
</welcome-file-list>
K_JUN 2009-01-15
  • 打赏
  • 举报
回复
应该是欢迎。。上面打错了。。
K_JUN 2009-01-15
  • 打赏
  • 举报
回复
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>


index.jsp 就是不欢迎页面换成你的my.jsp试试
酒剑仙 2009-01-15
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 ZiSheng 的回复:]
改为

XML code
<welcome-file-list>
<welcome-file>myjsp.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>



你试试
[/Quote]
配置默认首页。
比较高级的tomcat版本好像按楼主的写法 会把目录打出来的
ZiSheng 2009-01-15
  • 打赏
  • 举报
回复
改完后重新启动服务器
ZiSheng 2009-01-15
  • 打赏
  • 举报
回复
改为

<welcome-file-list>
<welcome-file>myjsp.jsp</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

你试试
xinyung 2009-01-15
  • 打赏
  • 举报
回复
看web.xml中的<welcome-file-list></welcome-file-list>中的文件你有没有
ZiSheng 2009-01-15
  • 打赏
  • 举报
回复
web.xml
的welcomelist标签
yukang_ky 2009-01-15
  • 打赏
  • 举报
回复
用楼上所说的方法就可以了。
z收获 2009-01-15
  • 打赏
  • 举报
回复

<welcome-file-list>
<welcome-file>test/myjsp.jsp </welcome-file>
</welcome-file-list>
[/Quote]

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧