【发布时间】:2012-07-25 04:56:39
【问题描述】:
我正在运行用 sitemesh 装饰的简单 JSP 页面(在 Spring 3.1 Web 应用程序中),但在我的项目中没有明确包含 sitemesh-decorator.tld 和 sitemesh-page.tld。它有效。
然而,我看到示例项目明确地将这些文件包含在 \WEB-INF\tld 文件夹中。这是必要的吗?如果是的话是为了什么?
例如,一个项目在所有页面中都导入了一个通用的taglibs.jsp 页面。它包括:
...
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
...
供记录
插入没有意义:
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
在要由sitemesh 处理的JSP 页面中。此包含应仅出现在装饰器页面中。
【问题讨论】:
标签: java spring taglib sitemesh