加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

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

发布时间:2020-12-15 00:00:06 所属栏目:Java 来源:网络整理
导读:我想通过透明地包含它们来进一步简化我的JSP.例如,这是我想删除的行: %@ include file="/jsp/common/include.jsp"% include.jsp文件基本上声明了我正在使用的所有标签库.我在WebSphere 6.0.2上运行这个我相信并已经尝试过这个配置: !-- Include this for e
我想通过透明地包含它们来进一步简化我的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>

包括前奏和包含coda都不行.

我正在阅读其他WebSphere用户无法使其运行;然而,tomcat用户能够.

解决方法

jsp-property-group在JSP 2.0(i.o.w. Servlet 2.4)中引入. Websphere 6.0是Servlet 2.3.

所以你有3个选择:

>忘记了>升级Websphere.>替换Websphere.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读