Struts - 所有 .tld 文件位于哪个 jar 文件中

发布于 2024-08-23 18:30:06 字数 442 浏览 3 评论 0原文

我正在开发一个基于 Struts 的 Web 应用程序。我是 Struts 的新手。我想在我的 jsp 页面中使用 struts 提供的 struts-html.tld taglib

当我在网上搜索时,我发现在Struts 1.2.9之前,我们需要手动找到.tld文件。

但现在这些 .tld 文件打包在 .jar 文件中,我们只需将这些 jar 文件用作项目中的任何其他 jar 文件即可。

Q1.所以我的问题是这些 .tld 文件位于哪个 jar 文件中。我从 Javaranch 的回答中得知,这些 .tld 文件被打包到 struts-taglib.jar 文件中。我下载了完整的 struts 库,但没有找到该 jar 文件。

I am developing a Struts based web application. I am new to Struts. I want to use struts-html.tld taglib, provided by struts, in my jsp pages.

When I searched on net, I came to know that prior to Struts 1.2.9, we need to locate the .tld files manually.

But now these .tld files are packed in .jar files and we need to just use those jar files as any other jar file in our project.

Q1. So my question is in Which jar file these .tld files are located. I came to know from a Javaranch answer that these .tld files are packed into struts-taglib.jar file. I downloaded the full struts libraries but didn't find that jar file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

彩扇题诗 2024-08-30 18:30:06

目前尚不清楚您使用的是哪个版本的 Struts,但您所指的 TLD 是 Struts 1 TLD。

在 Struts 1.3.10 中,它捆绑在 struts-taglib-1.3.10.jar/META-INF/tld/struts-html.tld 中,分布在 struts-1.3.10-lib.zip
在 Struts 1.2.9 中,您可以在 struts-1.2.9-lib.zip

以防万一,请注意 Struts 2 使用与 Struts 1 完全不同的标签库,并且只有一个标签库而不是多个。相应的 TLD 位于 struts2-core-2.1.8.1.jar/META-INF/struts-tags.tld 中。

It's not clear which version of Struts you're using but the TLD you are referring to is a Struts 1 TLD.

In Struts 1.3.10, it is bundled in struts-taglib-1.3.10.jar/META-INF/tld/struts-html.tld which is distributed in struts-1.3.10-lib.zip.
In Struts 1.2.9, you'll find it in the root of struts-1.2.9-lib.zip.

Just in case, note that Struts 2 uses a completely different tag library than Struts 1 and there is only one taglib instead of several. The corresponding TLD is located in struts2-core-2.1.8.1.jar/META-INF/struts-tags.tld.

抱猫软卧 2024-08-30 18:30:06

struts2-core-2.2.1.1.jar 将在以下位置包含 TLD 文件
struts2-core-2.2.1.1.jar/META-INF/struts-tags.tld

struts2-core-2.2.1.1.jar will contain the TLD file at the following location
struts2-core-2.2.1.1.jar/META-INF/struts-tags.tld

吃不饱 2024-08-30 18:30:06

我查看了我们使用 Struts 的一个项目。我可以看到这个 tld 文件: struts2-core-j4-2.0.11.jar\META-INF\struts-tags.tld

请注意,您可以使用 Windows 搜索来搜索 Jar 文件。如果您在搜索时遇到问题,请参阅此处

I looked in one of our projects using Struts. I can see this tld file: struts2-core-j4-2.0.11.jar\META-INF\struts-tags.tld

Note you can search through Jar files using Windows search. See here if you're having issues searching.

避讳 2024-08-30 18:30:06

下载 Struts完整发行版并找到 >struts-blank.war 在存档中。解压 struts-blank.war 并在 WEB-INF 文件夹下,将所有 .tld 文件复制到 WEB-INF 文件夹中。

Download the Full Distribution of Struts and find the struts-blank.war in the archive. Extract the struts-blank.war and under the WEB-INF folder, copy all the .tld files into your WEB-INF folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文