使用Jsp 加上tablib标识库,我们可以完成这种转换。
著名open source项目组jakarta.apache.org推出的系列标识库中,就有这个功能的tanglib:http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html
按照jakarta配置方法,有点繁琐,需要修改或定义Web.xml,本人经过摸索,使用下列相当简单的办法,就可以使Jsp能成功运行XSL这个标识库了。
xsl标识库有三个关键包:
- xerces.jar 可以在http://xml.apache.org/中得到
- xalan.jar 可以在http://xml.apache.org/中得到
- xsl.jar 从http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html得到
1.将这三个包放置到Tomcat的common/lib目录下,或者直接放入Classpath环境中。
2.在JSP中调用标识库:
原来Jakarta推荐方法是:
<%@taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="xsl" %>

收藏到QQ书签