如何使 JSTL 核心标签在 RAD6.0 中工作?

发布于 2024-08-30 09:22:13 字数 101 浏览 9 评论 0原文

我使用的是 RAD 6.0,我已将 jstl.jar 放在应用程序的 lib 文件夹下。当我使用 JSTL 标签时,它不会给出任何编译错误。但是当我尝试运行该应用程序时,核心标签不起作用。

I am using RAD 6.0, where I have put jstl.jar under the lib folder in my application. When I am using the JSTL tags, it does not give any copilation errors. But when I am trying to run the application, the core tags are not working.

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

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

发布评论

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

评论(2

不…忘初心 2024-09-06 09:22:13

RAD 6 / WAS 6 是针对 Servlet 2.4 的。因此:

  1. 确保您已包含 JSTL 1.1 在 web 应用程序的类路径(/WEB-INF/lib 文件夹)中。

  2. 确保您按照 JSTL 1.1 tlddoc(单击任意库即可查看它们)。例如

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    

    特别注意路径中存在/jsp,并且名称中不存在_rt前缀。

  3. 确保您已按照 Servlet 2.4 规范声明 web.xml(因此不是 Servlet 2.3 或更早版本)。

    <网络应用程序
        xmlns =“http://java.sun.com/xml/ns/j2ee”
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        版本=“2.4”>
    

RAD 6 / WAS 6 is Servlet 2.4 targeted. Thus:

  1. Ensure that you've included both jstl.jar and standard.jar of JSTL 1.1 in webapp's classpath (the /WEB-INF/lib folder).

  2. Ensure that you're declaring taglibs in top of JSP files as per JSTL 1.1 tlddoc (click any of libs to see them). E.g.

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    

    Especially note presence of /jsp in path and also the absence of the _rt prefix in name.

  3. Ensure you've declared web.xml as per Servlet 2.4 spec (and thus not as Servlet 2.3 or older).

    <web-app
        xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
    
指尖上的星空 2024-09-06 09:22:13

您应该将 jstl.jar 添加到特定项目的“项目属性”中的 Java 构建路径。

请注意,Java 构建路径和 MANIFEST.MF(对于运行时类路径)可能在某些时候不同步。因此,最好使用同样支持WebSphere Application Server 6.0 的Rational Application Developer 7.0 或7.5。

此外,Rational Application Developer 6.0 已经不再支持:
http://www-111.ibm.com/software/support/lifecycle/PLCDetail.wss?brand=rational&synkey=W170532D29019M02- L603472G19375Q17-M054243E02973V75&synkey=W170532D29019M02-L603472G19375Q17-R377236X92964B60&synkey=W170532D29019M02-T872435L 09150T44-O941388U48112Q95&ibm-view=View+details

本网站上的帖子是我自己的,并不一定代表立场、策略或IBM的意见

You should add the jstl.jar to the Java Build Path in the Project Properties of the particular project.

Be aware that Java Build Path and MANIFEST.MF (for runtime Classpath) can get out-of-sync at some point. Therefore it is better to use Rational Application Developer 7.0 or 7.5 which also support WebSphere Application Server 6.0.

Also, Rational Application Developer 6.0 is out-of-support already:
http://www-111.ibm.com/software/support/lifecycle/PLCDetail.wss?brand=rational&synkey=W170532D29019M02-L603472G19375Q17-M054243E02973V75&synkey=W170532D29019M02-L603472G19375Q17-R377236X92964B60&synkey=W170532D29019M02-T872435L09150T44-O941388U48112Q95&ibm-view=View+details

The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

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