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

我想通过透明地包含它们来进一步简化我的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.

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...