Updated and reformated:
JSP spec allows TLDs in any .jar file and in WEB-INF. TLD may contain application listeners. That means tomcat must scan all the .jars, as well as all .TLDs. Even if the app has no JSP or taglib - we still must can all .jars.
This is a pretty expensive operation ( some small test show 2/3 of the startup time on some apps with a lot of jars going in .tld processing ). If you have a lot of .jars or tags - it will be visible.
The simple solution that I checked in will just cache the result in a .ser file in work, and avoid re-scaning if no .jar or .tld has changed. It's "ant-like" ( setters and exec) so it could be used in the deploy tool ( if we had one :-).
Someone could also add a flag to turn off tld scanning - for example if no JSPs are
used ( cocoon, velocity, etc ).
In future this should be extended to include a cache of the extension list ( scanned by the classloader ) and packages ( used to optimize loading ).
Rant:
This is one of the big errors in the JSP spec (IMO) - other java APIs use META-INF/services or the manifest so at least you read a single entry in a JAR. In JSP - you have to scan the entire META-INF dir, and look for all files with .tld extension. It is nice idea from developer perspective to be able to just drop jars - how you specify the descriptors is a problem.
Technical stuff
Friday, January 24, 2003
TLD listeners and context initialization
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2003
(44)
-
▼
January
(23)
- Authorization and security
- Kde3.1 on RedHat 8
- Java security
- Tahoe
- JMX-enable a bean in 3 easy steps
- TLD listeners and context initialization
- int[] versus Integer or IntHolder
- Weblog and wiki
- Load balancing in jk
- Configurable TagPool in 50
- It's already done - nntp/rss gateway
- Using context params or JNDI for configuration
- SingleThreadedModel may be usefull
- Precompile the JSPs
- Classloader fun with JDK1.4
- More JMX in tomcat5
- Extension points in tomcat5
- UserDatabase needs changes
- Ser2xml
- Starting to "blog"
- Ant: delayed task creation
- import in ant
- JMX support in ThreadPool
-
▼
January
(23)
No comments:
Post a Comment