关于myeclipse8.5使用jsp:include提示错误

zhouliubin 2010-11-29 09:56:06
myeclipse8.5使用jsp:include提示错误

<jsp:include page="head.action"></jsp:include>

会提示:fragment "head.action" was not found at expected path /test/WEB-INF/page/fore/head.action
虽然项目跑起来没有问题,但这个提示很郁闷,请问怎么去掉这个错误提示?
...全文
366 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
枫桥 2012-08-10
  • 打赏
  • 举报
回复
我的可以正常运行,但是myeclipse8.5会提示错误,低版本的myeclipes不会提示错误。
ktzhxm1 2011-07-21
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 zhouliubin 的回复:]
引用 4 楼 magong 的回复:
引用楼主 zhouliubin 的回复:
myeclipse8.5使用jsp:include提示错误
Java code

<jsp:include page="head.action"></jsp:include>


会提示:fragment "head.action" was not found at expected path /tes……
[/Quote]
我也遇见这个问题,不知道怎么处理,的的是如下:
<jsp:include page="/gnxw/gnxw.html" flush="true"></jsp:include>
这个页面是动态生成的,运行没用问题,就是在写代码时报文件找不到!肯定找不到,不运行就没有。
zhouliubin 2010-11-30
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 lonelyexplorer 的回复:]
是不是Warning啊,去掉.action试试
[/Quote]
本来就是一个struts2的action,去掉action路径明显出错了
zhouliubin 2010-11-30
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 lonelyexplorer 的回复:]
是不是Warning啊,去掉.action试试
[/Quote]

这个提示不是警告,而是错误,怎么ingore?
zhouliubin 2010-11-30
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 magong 的回复:]
引用 6 楼 zhouliubin 的回复:

用“/head.action”一样会提示这个错误,不过提示成了WEBROOT目录了

还是官网Eclipse好啊,写成/head.action就没有错误提示了。
[/Quote]
也会提示,提示成了WEBROOT目录了,
Deng_Yucheng 2010-11-29
  • 打赏
  • 举报
回复
路径问题!
magong 2010-11-29
  • 打赏
  • 举报
回复
[Quote=引用楼主 zhouliubin 的回复:]
myeclipse8.5使用jsp:include提示错误
Java code

<jsp:include page="head.action"></jsp:include>


会提示:fragment "head.action" was not found at expected path /test/WEB-INF/page/fore/head.action
虽然项目跑起来没有问题,……
[/Quote]
用绝对路径啊,如
<jsp:include page="/head.action"></jsp:include>

当然,你的action不一定直接定义在/根下,自己调整吧。
危险的大猫 2010-11-29
  • 打赏
  • 举报
回复
路径错误/?
zhouliubin 2010-11-29
  • 打赏
  • 举报
回复
肯定正常的,运行起来一点问题都没有,这个是myeclipse的验证问题,想要的是去掉这个提示
my0510520 2010-11-29
  • 打赏
  • 举报
回复
没有找到head.action

你正常调用head.action了?
magong 2010-11-29
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 zhouliubin 的回复:]

用“/head.action”一样会提示这个错误,不过提示成了WEBROOT目录了
[/Quote]
还是官网Eclipse好啊,写成/head.action就没有错误提示了。
oOmiaoOo 2010-11-29
  • 打赏
  • 举报
回复
是不是Warning啊,去掉.action试试
ijse 2010-11-29
  • 打赏
  • 举报
回复
ignore掉它~

我没遇到过这问题。。
zhouliubin 2010-11-29
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 magong 的回复:]
引用楼主 zhouliubin 的回复:
myeclipse8.5使用jsp:include提示错误
Java code

<jsp:include page="head.action"></jsp:include>


会提示:fragment "head.action" was not found at expected path /test/WEB-INF/page/fore/……
[/Quote]
一定不是路径问题,都说了能正常运行,但myeclipse不能正常识别struts路径,用“/head.action”一样会提示这个错误,不过提示成了WEBROOT目录了
这个应该是myeclipse的验证问题的,
再次声明路径一定没有错误,再tomcat5,6都测试过,绝对没有问题,只是提示出错而已

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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