gpt4 book ai didi

java - 在每个 JSP 中自动包含一个 JSP

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:53:58 24 4
gpt4 key购买 nike

我想通过透明地包含它们来进一步简化我的 JSP。例如,这是我要删除的行:

<%@ include file="/jsp/common/include.jsp"%>

include.jsp 文件基本上声明了我正在使用的所有标记库。我在 WebSphere 6.0.2 上运行这个我相信并且已经尝试过这个配置:

<!--    Include this for every JSP page so we can strip an extra line from the JSP  -->
<jsp-config>
<jsp-property-group>
<url-pattern>*.htm</url-pattern>
<!--<include-prelude>/jsp/common/include.jsp</include-prelude>-->
<include-coda>/jsp/common/include.jsp</include-coda>
</jsp-property-group>
</jsp-config>

include-preludeinclude-coda 均无效。

我读到其他 WebSphere 用户无法启动和运行它;但是,tomcat 用户能够。

最佳答案

jsp-property-group 是在 JSP 2.0(即 Servlet 2.4)中引入的。 Websphere 6.0 是 Servlet 2.3。

所以你有 3 个选择:

  1. 算了。
  2. 升级 Websphere。
  3. 替换 Websphere。

关于java - 在每个 JSP 中自动包含一个 JSP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1240428/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com