如何预编译jsp标记文件? [英] How to pre-compile jsp tag files?

查看:70
本文介绍了如何预编译jsp标记文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

标记文件也可以编译成 Java类并捆绑为标签 图书馆.这在您希望的时候很有用 分发二进制版本的 没有原始标签库 来源.如果您选择这种形式 包装,您必须使用一种工具 产生可移植的JSP代码,该代码使用 仅标准API.

Tag files can also be compiled into Java classes and bundled as a tag library. 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.

如何预编译它们?我尝试了jspc,但失败了:

How can i pre-compile them? I tried jspc but it failed :

建立失败 org.apache.jasper.JasperException: ... link.tagx(8,40)指令.attribute 操作只能在标记文件中使用

BUILD FAILED org.apache.jasper.JasperException: ... link.tagx(8,40) directive.attribute action can be used in tag files only

推荐答案

看看这个链接.我认为预编译JSP还会预编译所引用的TAG库.

Have a look at this link. I think pre-compiling JSPs also pre-compiles the TAG libraries referenced.

这篇关于如何预编译jsp标记文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆