无法在 web.xml 或 jar 文件中解析 Struts 标签瓷砖

编程入门 行业动态 更新时间:2024-10-26 18:17:14
本文介绍了无法在 web.xml 或 jar 文件中解析 Struts 标签瓷砖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在 Eclipse IDE 和 JBoss5 服务器和 maven 中使用 Struts2 进行构建.我试图在一个简单的登录应用程序中使用磁贴.但我无法包含 taglib.我已经在 pom.xml 文件中导入了所有必要的 jars 依赖项.以下是我在 maven pom.xml 文件中包含的 jar 列表:

I am using Struts2 in Eclipse IDE and JBoss5 server and maven for build. I was trying to use tiles in a simple login application. But I am not able to include the taglib. I have imported all the necessary jars dependencies in pom.xml file. Following is the list of jars which I have included in maven pom.xml file:

struts2 核心 2.3.15.1struts2-tiles-plugin 2.3.15.1commons-beanutilsstruts-taglibcommons-digestercommons-beanutilstiles-api

而且我还包括并尝试了

and also I included and tried different possible combinations of

tiles-api-2.0.3.jar tiles-core-2.0.3.jar tiles-jsp-2.0.3.jarstruts-tiles.jar

仍然无法正常工作,错误是:

and still it is not working, the Errors are :

-The absolute uri: http://tiles.apache/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application
-ServletException including path '/layout.jsp'. 
-ServletException including path '/layout.jsp'. 

当我尝试在 JSP 页面上导入磁贴 taglib 时,它说

when I am trying to import tiles taglib on a JSP page it says

URI: http://tiles.apache/tags-tiles 无法解析web.xml 或使用此应用程序部署的 jar 文件.

URI: http://tiles.apache/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application.

我也试过谷歌.有一些解决方案,但它们对我不起作用.

I tried Google also. Got some solutions but they didn't work for me.

推荐答案

您应该使用至少 2.4 版的 servlet API.在瓷砖中,您可以使用 taglib 定义

You should use servlet API at least version 2.4. In the tiles you could use taglib definition

<%@ taglib uri="http://tiles.apache/tags-tiles" prefix="tiles" %>

不要用 Tiles 工件弄乱 Struts 1 taglib 和瓷砖罐.

Don't mess up Struts 1 taglib and tiles jars with Tiles artifacts.

这篇关于无法在 web.xml 或 jar 文件中解析 Struts 标签瓷砖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 13:14:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1394536.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:瓷砖   标签   文件   xml   web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!