Announcementes and change log
- 08/15/2010: Version 3.3.3 released:
This version contains 2 bug fixes including a major one. It is highly recommended to upgrade to this version.
There was an issue in the hashcode generation, which causes the bundle to be reloaded even if the bundle content didn't change. This implies some performance penalties.
The hashcode was based on the Java object ID instead of the bundle content.
The consequences are :- If you restart your application server, for the same application, Jawr could generate different hashcodes for the same bundle.
- If you are using load balancing and run the same application on 2 servers, they could generate different hashcodes for the same bundle.
- Issue #160 fixed: An exception is thrown, when using JMX on an application whose the context path is empty
- Issue #163 fixed: Issue with bundle hashcode generation which must be based on bundle content Thanks to Mark W. for reporting the hashcode generation issue.
- 07/20/2010: Version 3.3.2 released:
This version contains only bug fixes.
Fixed issues:- Issue #157 fixed: NullPointerException thrown in BrowserResolver when no user agent found in HTTP header
- Issue #159 fixed: Space in the dependencies configuration lead to omitted dependencies Thanks to zafo and Trygve Lie for reporting these issues.
- 06/29/2010: Version 3.3.1 released:
This version contains a lot of new features and bug fixes.
New features:- One of the big new features of this release is the ability to define variant bundles. A variant bundle is the generalization of what already exists for the locale aware bundle. A variant bundle is a bundle which can change depending on some defined criteria. This means for example that you can define a specific bundle content by browser type. You can define a specific bundle for IE, and for the same bundle sent another content to Firefox, Chrome, Opera... For more information about the variant bundle, please check the following variant bundle documentation for more detail.
- One of the feature derived from the use of variant bundle is the support for CSS bundle skin. Jawr allows you to define CSS bundle, where the skin variant will be sent back to the user depending on the skin used by the user. The user skin is defined in a cookie. The good news is that the CSS skin can also be combined with the user locale, which means that Jawr is able to sent to the user the CSS bundle depending on the user skin and also depending on the user locale. For more information about how to use the new skin feature, please check the following Jawr skin documentation for more detail.
- The Jawr CSS tag has been updated to be able to generate title and alternate attributes for CSS bundles. The Jawr CSS tag has also been updated to be able to generate alternate for CSS skin bundles. Look for the CSS tag at the tag library doc for extra info.
- The Jawr skin swicther javascript generator has been created to generate the javascript file for the skin switcher. You can take a look to the generators documentation for more info.
-
Jawr now supports base64 image encoding.
Jawr is now able to generate base64 encoded image in your CSS bundle using a new postprocessor.
Please check the tutorial on how to use Jawr to generate base64 image in CSS bundle for more detail.
The Jawr image tags have been updated to be able to generate base64 encoded image. Please check the documentation on the taglib description for more detail. - Jawr supports hashcode bundle generator. This means that you can now define your own implementation of the id used to identify the bundle.(Ex: application version based, ...) For more detail, about how to implement your own hashcode bundle generator, take a look at the documentation about hashcode bundle generator.
- Jawr provides also an MD5 hashcode bundle generator, which use MD5 to create the bundle hashcode. Take a look at the documentation about hashcode bundle generator.
-
Jawr introduces the strict mode. For earlier version, Jawr didn't take in account the hashcode of the requested bundle.
This means that if a user request a bundle, for which the hashcode is different from the current one, Jawr will sent back the current bundle.
This may be an issue if you are using an application on a clustered environment. If you deploy a new version of your application on one server, while the other is still up. You can face cases where the user request a page on one server, and try to retrieve the web resource bundles one another.
This may lead to strange behaviors.
To overcome this issue, Jawr introduces the strict mode. In this mode, Jawr will allow you to define how you want to handle such requests by defining your own IllegalBundleRequestHandler. Jawr also provides a default implementation whch returns a "404" if it receive a such request. Take a look at the documentation about strict mode and illegal bundle request handler. Jawr provides just a default implementation, if you want to contribute and share your own implementation with the community, feel free to create and attach a patch in the issue tracker. -
Jawr supports composite bundle postprocessors for bundle and for the unitary files.
You can take a look to the postprocessors documentation for more info. - Jawr uses now alphabetical ordering for bundle resources by default.
- Jawr supports media keyword in CSS Import PostProcessor. Please check the CSS import postprocessor documentation for more detail.
- Jawr introduce a new postprocessor to combine CSS media. Please check the CSS combine media postprocessor documentation for more detail. Thanks to Gerben Jorna for the implementation of this feature.
- Issue #41 fixed: Add title attribute to style tag
- Issue #127 fixed: Problem parsing jawr-jsp2x.tld in Resin
- Issue #132 fixed: CSS image URL not written properly for generators which don't handle CSS images
- Issue #133 fixed: Issue on Jawr context management for debug mode and JMX in the JawrSpringController
- Issue #134 fixed: In debug mode, Jawr generates wrong CSS image paths for generated Css resources when using JawrSpringController
- Issue #139 fixed: Jawr don't handle *.ico files as image files
- Issue #141 fixed: Issue on Jawr CssMinifier which doesn't handle properly CSS rules with linefeed inside
- Issue #144 fixed: NPE when using jawr.debug.ie.force.css.bundle=true and ieonly.condition bundle property.
- Issue #145 fixed: Jawr not compatible with Java 1.4.
- Issue #146 fixed: ThreadLocal memory leak when reloading application.
- Issue #151 fixed: The Wicket image tag rendering is not working properly for HTML images
- Issue #152 fixed: For the image tags in Wicket, Jawr doesn't handle properly the URL generation of generated images Thanks to eliotsykes, mkkoch, wangg3, Martin Jönsson, jnichols959 and all those who participate through the discusion forum for reporting issues and giving feedbacks.
Thanks also to Gerben Jorna for his implementation of the combine media post processor and for the base implementation of the base64 CSS image postprocessor.
Jawr ant task and maven plugin - Version 1.4 released:
This version contains one new feature and one bug fix.
New feature:
- For IE6 and IE7 CSS bundles which use the new base64ImageEncoder, the bundle processor generates a placeholder for the web application URL. Please take a look to the following documentation for more detail.
- Issue #142 fixed: Add support to generate exact path mapping for Jawr bundle processor .
Jawr Grails plugin - Version 3.3.1 released:
We are happy to finally provide to the Grails community the latest Jawr Grails plugin, which is fully compatible with all the new features of the Jawr 3.3.1 version. We also would like to apologize for the discontinuation of the plugin release.
We are sorry for the inconvenience made to the Grails users, which where not able to use Jawr. We hope that you will enjoy this new version with all the latest features of Jawr.
The Grails plugin 3.3.1 is available here.
It will be soon available at the grails plugin repository.
New feature:
- Compatible with Grails version > 1.2.1
- Fully compatible with Jawr 3.3.1.
- Issue #68 fixed : jawr.config.reload.refreshKey fails on the Grails plugin
- Issue #130 fixed: In develpment Since Grails 1.2, Jawr can't reference pluing resources
- Issue #148 fixed: Since grails 1.2, Jawr is not able to generate i18n messages
- Issue #149 fixed: Since grails 1.2, Jawr is not able to generate i18n messages
The following Jawr sample applications have been updated. You can have a look to them to see how to integrate the latest features :
- basicwebapp
- spring sample
- wicket sample
- grails sample
Important note :
It is important to notice that this version will be the last version which supports Java 1.4. The next major release will target Java 5.
Thanks to all of you who contributed and provided feedback in the discussion forum.
There still a lot to do. So any contribution is more than welcome.
If you want to be part of the Jawr project, don't hesitate, join us.
This version contains mainly bug fixes.
New feature:
-
For spring MVC projects, Jawr now allows you to use simultaneously configuration and configLocation properties.
The values found in the configuration file at configLocation will be overrided by the properties defined in configuration.
The configuration property is no more deprecated. Thanks to sfrancois99 and szeller for their feedbacks.
Please check the documentation on the Spring MVC integration for more detail.
- Issue #81 fixed:jawr.[type].factory.dirmapper.excluded property doesn't work.
- Issue #113 fixed: In spring MVC, when using only configuration property an exception is thrown.
- Issue #115 fixed: Css image sprite generation doesn't work for generated CSS resource.
- Issue #118 fixed: Image Streaming throws exception if the browser closes the stream
- Issue #123 fixed: Images are not handled property with JawrSpringController.
- Issue #124 fixed: The property "factory.use.orphans.mapper" is never taken in account. To be compliant with the Jawr properties naming convention, this property has been renamed to jawr.factory.use.orphans.mapper. Please check descriptor syntax doc for more detail.
- Issue #125 fixed: In Spring MVC, an exception is thrown when the controller mapping is defined while the Spring servlet mapping is set to "/*". Thanks to qxo, mahoney266 and Robin Sander for reporting issues.
Jawr ant task and maven plugin - Version 1.3 released:
This version contains only one bug fix.
Fixed issue:
- Issue #116 fixed: Jawr bundle processing with the maven plugin or ant Task doesn't work with a spring MVC project. Please check the bundle preprocessing documentation for more detail. Thanks to acklenx for reporting the issue.
A serious security issue has been found in Jawr when using the property jawr.debug.overrideKey, which allowed a user to access the content of the WEB-INF folder, and any file of your web application if the user finds the value of the property jawr.debug.overrideKey, which is defined your configuration file.
This issue is fixed in this new version.
We highly recommend you to switch to this new version or at least to remove this property from your configuration file if you want to stay with a previous version. The recommended way to switch your current session from production to debug, is to use the JMX feature of Jawr. Please check the JMX documentation for more detail.
For those, who have created their own resource generator, we recommend them to look at the security issue section of the generator documentation
New features/ fixed issues:
-
Jawr supports the generation of CSS image sprites. Jawr uses smartsprites for the sprite generation.
Thanks to Stanislaw Osinski, smartsprites creator, for his help on the integration of Jawr with smartsprites.
Please check the tutorial on the image sprite generation with Jawr for more detail. -
Jawr now provides a new property named dependencies, which allows the user to define the dependencies for a bundle.
Thanks to kgray for the original idea.
Please check the bundle definition document for more detail. -
Jawr now provides support for Wicket, thanks to a patch submitted by Robert Kopaczewski.
Please check the Wicket integration document for more detail. - The generator API has been enhanced. Now you can create image generators, locale aware generators and generators, which support directory mapping. Please check the advanced generators document for more detail.
- Jawr provides an new API for global preprocessor. The global preprocessors are executed before the standard resource bundling and post processing. Please check the global preprocessor document for more detail.
-
Jawr has introduced a new feature to overcome in debug mode the IE limitation, which can only handle 30 stylesheets in one page.
This is particularly usefull for user which have CSS bundles in one page, containing more than 30 stylesheets. The new property jawr.debug.ie.force.css.bundle has been added for this purpose. If you set this value to true, in debug mode with an IE browser, Jawr will reference each CSS bundle as a unique CSS resource, instead of referencing all the resources of the bundle. Please check descriptor syntax doc for more detail. - The property jawr.css.image.classpath.use.servlet has been renamed to jawr.css.classpath.handle.image. So the use of jawr.css.image.classpath.use.servlet in your configuration file is deprecated. Use the property jawr.css.classpath.handle.image instead. Please check descriptor syntax doc for more detail.
Fixed issues:
- Issue #98 fixed: Input image tag produces <input type="image" disabled="false"> which disables the button.
- Issue #105 fixed: css @charset declarations must be filtered out for CSS bundle.
- Issue #107 fixed: NullPointerException when using JAWR in JSR-168 context.
- Issue #108 fixed: No check for duplicate rendering of bundles using an alternate production URL.
- Issue #109 fixed: Unnecessary bundling process for bundle using alternate production URL.
- Issue #110 fixed: Image content length is set after the response has been sent.
- Issue #111 fixed: Able to view files under web-inf directory.
- Issue #112 fixed:jawr.config.reload.interval, jawr.config.reload.refreshKey don't work for Jawr with Spring MVC. Thanks to rodneyphillips, axelfont, tkaefer and chupa for reporting issues.
This version contains only bug fixes.
Fixed issues:
- Issue #93 fixed: Localized messages generation only generates default locale when using message generator parameters.
- Issue #95 fixed: CSS classpath generated resources contain postprocessors data in debug mode. Thanks to jmundt for reporting localized messages issue.
Jawr ant task and maven plugin - Version 1.1.2 released:
This version contains only one bug fix.
Fixed issue:
- Issue #96 fixed: Remove entity resolution in web.xml when using bundle preprocessor. Thanks to acklenx for reporting the issue.
This version contains only bug fixes.
Fixed issues:
- Issue #76 fixed: A Page should render resource bundle only once.
- Issue #89 fixed: Multiple invocations of a custom generator.
- Issue #90 fixed: RendererRequestUtils.setRequestDebuggable(...) creates http sessions.
- Issue #91 fixed: Src of img tag does not support relative path and is incorrect when the requested page is not in the web application root directory.
- Issue #92 fixed: Jawr trips over Javascript multiline string literals We would like to thank qxo, jmundt, reardonm, cpo, kape and axelfont for reporting issues and providing patches when possible.
This version contains mainly bug fixes.
New features/ fixed issues:
- A new tag have been added to the tag library to generate the URL to an image which is handled by Jawr. Look for the image tags at the tag library doc for extra info.
- Issue #74 fixed: NoSuchElementException when bundle has no file. The issue occured when a bundle was defined with no mapping.
- Issue #75 fixed: NullPointerException when using JawrImgServlet and image does not exist.
- Issue #79 fixed: NullPointerException while requesting a CSS in debug mode if no Jawr image servlet was defined.
- Issue #88 fixed: Incorrect logging of "The jawr bundle mapping 'jawr-img-mapping.properties' is not found" We would like to thank sfrancois99, qxo and nordicdevil for reporting issues and providing patches when possible.
New features/ fixed issues:
-
Jawr is now able to handle images. This means that all images managed by Jawr will be cached in the browser as the other Javascript and CSS resources.
By default all CSS images will be handled by Jawr if the Jawr image servlet is defined.
Look for the Jawr image handling section in the servlet docs and at jawr.image.resources in the descriptor syntax docs for extra info.
Two new tags have been added to the tag library to handle these images. Look for the image tags at the tag library doc for extra info. - Jawr supports now JMX, which means that you will be able to modify at runtime the behaviour of Jawr using a JMX console. For example, you will be able to pass from production mode to debug mode an entire application or only one session at runtime. Look at the JMX support doc for extra info.
- A new "bundle preprocessing" feature has been added in Jawr. This feature is also known as "build time bundle processing". This feature allows the user to skip the bundling process at server start-up, and use instead the data of preprocessed bundles. Look at the bundle preprocessing documentation for extra info.
-
We have also created a maven plugin and an Ant task to integrate the new bundle preprocessing feature in the project build phase.
Look at the Jawr Ant task docs and the Jawr maven plugin docs for extra info.
Thanks to Andreas Andreou for the original idea of the maven plugin. -
We have also decided to provide a better support to usage of CDN in Jawr.
The new property jawr.url.contextpath.ssl.override allows you to define what the CDN URL to use for HTTPS requests is.
In debug mode, it is now possible to reference the debug resource files deployed on the CDN. To enable this feature, you will have to set to true, the property jawr.url.contextpath.override.used.in.debug.mode.
Look for these properties in the descriptor syntax docs for extra info. - The property jawr.css.imagepath.override which defined the override path for CSS images has been removed. Now for CSS images, Jawr generates URLs which are relative to the CSS bundle even if the resource is deployed on a CDN. Look at the jawr.css.imagepath.override section at the bundle preprocessing doc for extra info.
- For a better support of CDN, Jawr provides resources which can be integrated more easily in CDN. These files are generated using the bundle preprocessing feature. It even provides a rewrite configuration file for Apache server. Look at the CDN support section at the bundle preprocessing doc for extra info.
- Jawr is now able to discover automatically the locales available for message resources. So the use of the bundle property jawr.js.bundle.[name].locales is no more necessary. Look for jawr.js.bundle.[name].locales at descriptor syntax doc for extra info.
- Issue #69 fixed: CSS from jar file fails when using jawr.debug.overrideKey in production, is now fixed.
- Issue #66 fixed: Add support for @import keyword in CSS is now fixed. You can use the new cssimport post processor to resolve the CSS import. Please take a look at the section CSS Import resolver at postprocessors documentation for more info.
- Issue #72 fixed: Avoid skipping repeated members of bundles in debug mode which is fixed now. Before when the same resources was referenced twice in debug mode, the second one was skipped.
- Issue #73 fixed: java.lang.IndexOutOfBoundsException in CSSMinifier is fixed now. The issue occured when the CSS file contains a '$' character in a non commented section.
New features/ fixed issues:
- While until now it has been possible to load CSS from the classpath, images referenced in them would not be resolved. Now the Jawr servlet can be used to serve images from the classpath as well, thus enabling fully the ability to serve styles and related images from jar files. Look for jawr.css.image.classpath.use.servlet at the servlet docs for extra info.
- The classpath resource generator now allows to use the jar: prefix to map css (it used to be jar_css: for css, now the syntax is the same for both js and css files).
- It is possible to request debug debug mode for a page in production mode. The purpose is to be able to have a javascript debugging session in a deployed application. The bundle members will be requested sepparately as if Jawr were in debug mode easing debug operations without having to redeploy. This is done by adding a special request parameter which is defined in configuration. Look for jawr.debug.overrideKey at the debug and production modes documentation for extra info.
- A new way to force a refresh of all bundles has been added. A secret parameter name is defined in configuration using the key jawr.config.reload.refreshKey, and whenever a request that matches the Jawr servlet includes it, the configuration wil be reloaded. Look for jawr.config.reload.refreshKey at the servlet docs for extra info.
- Orphans search and auto bundle generation can now be disabled for convenience using a new configuration parameter named factory.use.orphans.mapper. It is on by default but when set to false orphans will no longer be searched for.
- Bundles can now be defined with an alternate static URL to use in production mode. This is useful for instance to use publicly served libraries (e.g. the YUI framework) while still using locally served files in development mode. Details can be found at at the bundle definition documentation, check out the productionURL param.
- Issue #60 fixed: Per-file custom postprocessor were not being added to the postprocessing chain. Thanks to user ebottard for providing a patch to solve the issue.
- Issue #61 fixed: The URL path rewriting postprocessor for CSS files was corrupting data: scheme image URLs which is now fixed. Thanks to user Tim Kingman for providing a patch to solve the issue.
- Issue #63 fixed: The 'jawr.custom.postprocessors.names' property is no longer required. Instead, Jawr will detect all 'jawr.custom.postprocessors.[name_of_the_postprocessor].class' declarations to define postprocessors.
- Issue #65 fixed: There was a file leak when using the jawr.config.reload.interval parameter because of a non closed FileInputStream. Fixed.
- Issue #67 fixed: It was not possible to use more than one custom postprocessor per chain due to a bug which is now fixed.
New features/ fixed issues:
- EL expressions in tag libraries are now supported on older servlet containers, thanks to a patch submitted by Ibrahim Chaehoi.
- The jawr.*.bundle.names property is now deprecated, also thanks to a patch submitted by Ibrahim Chaehoi. You may remove all jawr.js.bundle.names and jawr.css.bundle.names from your descriptors. You can still use them if you feel more comfortable that way.
- Jawr now supports jawr.url.contextpath.override that begin with: //. This is a protocol relative url structure. It's handy when you are sharing your css and/or js with different domains and protocols. So these // urls will work relative to http and https.
- Added jawr.css.imagepath.override property to allow for css url replacement that supports absolute URLs or really anything you would like prepended to the URL. This is usefull if you are sharing your css across multiple domains and use background images.
- Classloading has been improved to better support the 18n messages generator, which failed to load properties files under certain conditions.
- Fixed issue 49 (with no jawr.csslinks.flavor setting, style tags are ended with 'null')
- Fixed issue 56 (incorrect path management in Spring MVC controller )
New features/ fixed issues:
- Spring MVC support added. Jawr now provides a Spring MVC Controller so it can now be fully configured through Spring's configuration mechanism. See the manual page for details.
- The way LINK tags are rendered can now be configured. Specifically, depending on the content type you choose for your pages, you may need the link tags to be closed differently, or even not closed at all. By default, tags will be closed as usual (i.e. with '/>'). But adding a new parameter to the properties configuration will make this behavior change. Check the taglib documentation and look for 'jawr.csslinks.flavor' for details.
- A new generator has been added. Now CSS resources can be retrieved from the classpath by using the jar_css prefix.
- [Issue #46] The jawr[css|js].bundle.names property is now augmentable when using ConfigPropertiesAugmenter, as it should have from the start.
- [Unregistered Issue] Jawr does not close the outputstream nor the output writers handed by the servlet container, since that's an illegal operation, as was pointed out by user Lance.
New features/ fixed issues:
- [Grails, issue #26] Switched from using controllers to using a servlet: This has several advantages: it is faster, there is no need to fiddle with the grails.mime.file.extensions property, and no controller mappings need to be added. So if you are upgrading, you need to remove the controller mappings, reset the grails.mime.file.extensions property and then follow URL mapping instructions at the plugin instructions page.
- [Grails, issue #32] New grails-only implementation of the i18n messages generator that solves all previous issues. It is no longer needed to copy properties files when deploying/running in war mode, and the previous message character encoding issues should be gone for good.
- [Issue #44] Added code to respond with 304 to requests having the If-None-Match header.
- Link tags are now ended with '/>' as opposed to </link>to improve validability. While in a perfect word there should be no closing tag at all in non-xhtml documents, this seems to be the best compromise.
- Fixed improper exception handling at some points where stack data was being spoiled.
New features:
- CDN support: Jawr can be used with a CDN by setting the parameter to an absolute URL.
- Generators API: you can now write components that dynamically generate scripts or CSS during the application startup.
- Ability to read config the file from the filesystem: instead of reading only from the classpath, the config properties file can now be read from the filesystem. To do it the config parameter must be prefixed with file:, followed by the absolute file path.
- Multiple configuration sources can be used when integrating Jawr with other frameworks.
- #31:media="print" ignored when useRandomParam="false"
- #29:Contextpath override does not work with absolute URLs (see CDN support above)
- #19:PropsFilePropertiesSource.configChanged() doesn't work on Tomcat (now properties can be read from the filesystem)
- Also, a new version of the DWR 3 has been published, fixing the latest incompatibilities.
A performance improvement has been added: buffering is now used when using writers. Thanks to Richie for submitting a patch.
There was a bug causing CSS URLs to be broken when using the static pages resource includer, which is now fixed.
A bug was introduced in the last release which kept DWR 2 from working with Jawr. This release fixes that bug.
Also, a new interface has been added which ConfigPropertiesSource custom implementations can use to get access to the servlet context. The class is named net.jawr.web.resource.bundle.factory.util.ServletContextAware.
Jawr can be used in plain HTML pages: This has been a major drawback for Jawr, since many times applications are a mix of static HTML and dynamic pages. Click here to find out how this has been solved.
Commons Validator integration: Users of Struts and other libraries supporting the Commons Validator can now have the static and dynamic scripts added to bundles, minified and compressed with Jawr.
DWR 3 support: Jawr now supports the upcoming version 3 of the DWR framework.
Locale bundles can now be used as part of composite bundles.
Several bugs were fixed:
- Grails i18n messages encoding fix.
- i18n messages replacement was not working properly.
- i18n bug in mappings (parameters were parsed incorrectly).
- Bug with 'dwr:_**' mapping in debug mode.
DWR integration: DWR users can now leverage the new integration with Jawr, which allows bundling all DWR resources along with other static scripts.
Mapping of classpath resources: bundles can now map to resources (javascript and CSS) which are available in the classpath.
Also, several bugs were fixed:
- bug in i18n message generation: was failing when a dollar sign was found in a message.
- bug for i18n messages: in debug mode, would get 404s if the mapping was not set to attend *.js requests.
- bug in CSS link rewriter, which failed when Jawr mapping had several subdomains.
- Decreased logging verbosity of the ConcurrentCollectionsFactory.
Other than that, mostly internal changes and bugfixes. The internal changes include a new system to map to Generators. These are java components which generate javascript/CSS, or read it from a different place than the usual WAR directories. This opens interesting possibilities for the near future.