setTextEncoding on JavascriptResourceReferences/CssResourceReferences
---------------------------------------------------------------------

                 Key: WICKET-4457
                 URL: https://issues.apache.org/jira/browse/WICKET-4457
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5.4
            Reporter: David Loidolt


Setting the encoding of JavascriptResources and CssResources in wicket is by 
now not easily to achieve.
By now only html files are equipped with the charset option afterwads, but not 
CSS or JS files. 

Content-Type: application/javascript;charset=UTF8

org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does 
take the textEncoding into account,
but there is no way to set it from the outside without introducing new classes 
by copy/pasting existing Resources and adapt them. 

The only resource which is able to modify the content-type through the 
constructor is the TextTemplateResource. 
One can specify "application/javascript; charset=UTF8" and pass it as the 
content-type parameter. 
It's a hack,  but  this string then used for the content-type header.
A separate charset parameter would be better in my opinion. 

UserGroup post: 
http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html





 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to