laxman954 / granule

Automatically exported from code.google.com/p/granule
0 stars 0 forks source link

"jsessionid" attribute added to CSS and JS links #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Jonathan,

When evaluating Granule 1.0.9 we have faced an issue on Tomcat 6.0.33
when CSS and JS links passed to Granule in some test cases where extended 
with "jsessionid" attribute by servlet container.
We beleive it happens in scope of some URL rewriting for session tracking,
like it was discussed in Tomcat forum some time ago:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200407.mbox/%3C4106C206.20
20702@fiskars.com%3E

Due to this fact CSS and JS links are coming into CompressTagHandler looking 
like this, for example:

/peoplebook-web/js/ext-js/resources/css/ext-all.css;jsessionid=63DF136D17F40FA53
0A76083932A05E6

causing Granule to throw an exception like this:

com.granule.JSCompileException: Dynamic or remote stylesheets can not be 
combined. 
href=/peoplebook-web/js/ext-js/resources/css/ext-all.css;jsessionid=63DF136D17F4
0FA530A76083932A05E6
com.granule.CompressTagHandler.processChunk(CompressTagHandler.java:284)
com.granule.CompressTagHandler.handleTag(CompressTagHandler.java:198)
com.granule.CompressTag.doAfterBody(CompressTag.java:66)

Let me suggest a patch to file  
tag-main/src/com/granule/CompressTagHandler.java 
which is fixing the problem (attached below).
Files in attachment:

CompressTagHandler.diff  - change in DIFF format
CompressTagHandler.java  - changed file
CompressTagHandler.diff.htm  - change report generated by WinMerge program

Could you please let me know what do you think about this change?

Best regards,
Egor Abramovich

Original issue reported on code.google.com by egor.abr...@gmail.com on 2 Sep 2011 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
Works fine. Thanks by this fix.

Original comment by carlos.s...@gmail.com on 19 Aug 2012 at 2:15

GoogleCodeExporter commented 8 years ago
The fix is merged into the fork -
https://github.com/SmartITEngineering/Granule

Original comment by imyou...@gmail.com on 20 Dec 2012 at 5:54

GoogleCodeExporter commented 8 years ago
I am too facing issue but while combining files from remote cache server

Original comment by gautam.n...@gmail.com on 26 Feb 2013 at 12:38