我为我的struts 2项目创建了一个自定义标记库。现在我想把我所有的源代码放到一个jar文件中。它工作得很好,但我担心的是,我仍然需要在web中配置我的.tld文件,才能让它工作:
<jsp-config>
<taglib>
<taglib-uri>/custom-tags</taglib-uri>
<taglib-location>/META-INF/mytaglib.tld</taglib-location>
</taglib>
</jsp-config>有没有一种方法可以去掉它并在jar文件中配置它呢?
发布于 2012-07-09 20:13:05
这不应该与Struts2有任何关系,真的。为了避免在web.xml中进行配置,您应该能够将.tld文件放在jar根目录下的META-INF文件夹中,并使用<uri>/custom-tags</uri>在.tld中声明uri。
https://stackoverflow.com/questions/11388166
复制相似问题