简体   繁体   English

如何预编译jsp标记文件?

[英]How to pre-compile jsp tag files?

http://download.oracle.com/javaee/1.4/tutorial/doc/JSPTags6.html says: http://download.oracle.com/javaee/1.4/tutorial/doc/JSPTags6.html说:

Tag files can also be compiled into Java classes and bundled as a tag library. 标记文件也可以编译成Java类并捆绑为标记库。 This is useful when you wish to distribute a binary version of the tag library without the original source. 当您希望分发没有原始源的标记库的二进制版本时,这很有用。 If you choose this form of packaging, you must use a tool that produces portable JSP code that uses only standard APIs. 如果选择这种包装形式,则必须使用生成仅使用标准API的可移植JSP代码的工具。

How can i pre-compile them? 我如何预编译它们? I tried jspc but it failed : 我尝试了jspc但失败了:

BUILD FAILED org.apache.jasper.JasperException: ... link.tagx(8,40) directive.attribute action can be used in tag files only 失败的org.apache.jasper.JasperException:... link.tagx(8,40)指令.attribute操作只能在标记文件中使用

Have a look at this link . 看一下这个链接 I think pre-compiling JSPs also pre-compiles the TAG libraries referenced. 我认为预编译JSP还可以预编译所引用的TAG库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM