pack:tag: Compressing JSP Taglib
Written by on April 3rd, 2007 in Ajax News.
pack:tag is a static-resource compressing JSP-Taglib. It caches ad hoc compressed JavaScript or CSS in memory (in a Java Servlet) or in a generated file. It works transparently to the developer and the compressing-algorithms are pluggable.
Features
- Minification of JavaScript and Cascading Style Sheets
- Caching to filesystem or memory (servlet)
- When caching to memory, the minified content is additional gzipped
- Apache Standard Taglib support for evaluations
- Compression and hashcode-generation adjustable on single resources
Examples
You would use JSP tags such as the following in your JSP files:
HTML:
-
-
<pack :script src=”myJavaScriptFile.js”/>
-
<pack :style src=”myCascadingStyleSheet.css”/>
-
<pack :script src=”myJavaScriptFile.js” enabled=”false”/>
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/packtag-compressing-jsp-taglib