是否可以在Tomcat中关闭taglib扫描? [英] Is it possible to turn off taglib scanning in Tomcat?

查看:193
本文介绍了是否可以在Tomcat中关闭taglib扫描?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在启动时,Tomcat递归扫描WEB-INF目录中的TLD(标记库描述符)文件。因此,如果webapp在该目录下有很多文件,则会降低启动过程的速度。有没有人知道在这种情况下是否有办法完全关闭扫描,或者至少提供一个过滤器来缩小搜索范围?

On startup, Tomcat recursively scans the WEB-INF directories for TLD (Tag Library Descriptor) files. As a result, if a webapp has a lot of files under that directory, it slows down the startup process. Does anyone know if there is a way in that situation to turn off scanning completely, or at least provide a filter to narrow the search?

推荐答案

您可以在上下文中添加processTlds属性,

You can add processTlds attributes in the context,

  <Context processTlds="false" ... />

但是,如果不扫描JAR,JAR文件中定义的TLD将无法运行。您必须在WEB-INF中定义所有TLD。

However, your TLDs defined in the JAR file wouldn't work without scanning the JARs. You have to define all TLDs in WEB-INF.

这篇关于是否可以在Tomcat中关闭taglib扫描?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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