在eclipse中将struts 2的jar文件放在哪里,给出错误index.jsp(8,40) File"/struts-tags"未找到
Eclipse 只提供了在 Java 构建路径 -> 库中包含 jar 文件的选项。在一些教程站点中,他们显示在 WEb-INF/lib 中添加 jar 文件,但我无法在此处添加 jar。我尝试导入文件到 WEB-INF/lib,添加了 jar,但它们没有 jar 图标,而是一些奇怪的图标,当我尝试运行我的 struts 登录页面时,它给了我错误 /index.jsp(8,40) 文件“/struts-tags”未找到。在哪里放置 jar 使其工作,另外,在学习 struts 时,有时我收到 Http 404 错误,但是当我重新启动 eclipse 时(我尝试重新启动服务器,但是它没有帮助)错误突然消失了。为什么会发生这种情况。Eclipse 是如此令人困惑。
Eclipse is only giving me option to include jar files in Java Build Path->Libraries .In some tutorial sites they are showing to add jar files in WEb-INF/lib,but iam not able to add jar here.i tried importing files to WEB-INF/lib,jars were added but they did not had jar icon instead some weird icon ,and when i m trying to run my struts login page its giving me error
/index.jsp(8,40) File "/struts-tags" not found.Where to put jar to make it work,Also while learning struts sometime i get Http 404 error,but when i restart eclipse(I tried restarting server but it didnt help) the error is gone all of a sudden.why this is happening.Eclipse is so confusing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
转到 eclipse 外部的 web 项目文件夹。复制你的 jar 文件(这是你的项目所必需的)。
打开 Eclipse,按照以下步骤
添加所需的 jars,我希望如此会解决你的问题。
确保您的类路径中有所需的罐子..
Go to the your web-project folder outside the eclipse.Cope your jars (which are required for your project).
Than open-up Eclipse, follow these steps
Add required jars and i hope this will solve your problem.
Make sure you have required jars in your class-path..
由于 jar 显示一些奇怪的图标,我建议您更改 jar 文件。另外,请确保添加的 jar 包含 struts-tags.tld 文件。这将解决 index.jsp 上的错误。
抱歉,系统不允许我发表评论。所以编辑相同。
按照以下步骤检查 jar 是否已正确添加到构建路径 -
As jars are showing some weird icon, I would suggest you to change the jar files. Also, make sure your added jar contains struts-tags.tld file. This will resolve error on index.jsp.
sorry, system is not allowing me to put comment. So editing the same.
Follow below steps to check the jars are added to build path correctly -