OSGI Configuration "Default Parameter Encoding" UTF-8 | Community
Skip to main content
October 16, 2015
Solved

OSGI Configuration "Default Parameter Encoding" UTF-8

  • October 16, 2015
  • 2 replies
  • 1817 views

Hi,

I set the OSGI Configuration "Default Parameter Encoding" in "Apache Sling Request Parameter Handling" to UTF-8 but query string request parameters are still decoded as ISO-Latin-1.

When I set the the additional request parameter "_charset_=UTF-8" it works.

Is there any reason that the OSGI Configuration "Default Parameter Encoding" is not sufficient?

Best regards,

Ronald

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ronald_ploeger

The problem is a NullpointerException in the configuration class "RequestParameterSupportConfigurer". One can only avoid this by setting the property "Temporary File Location" to an absolute path. Else the code tries to access a method on

final SlingSettingsService settings = (SlingSettingsService) context.locateService("SlingSettings");

which is null. I created an Issue in the Sling Jira: https://issues.apache.org/jira/browse/SLING-4339

Ronald

2 replies

ronald_ploegerAuthorAccepted solution
October 16, 2015

The problem is a NullpointerException in the configuration class "RequestParameterSupportConfigurer". One can only avoid this by setting the property "Temporary File Location" to an absolute path. Else the code tries to access a method on

final SlingSettingsService settings = (SlingSettingsService) context.locateService("SlingSettings");

which is null. I created an Issue in the Sling Jira: https://issues.apache.org/jira/browse/SLING-4339

Ronald

November 1, 2016

Hi Ronald,

I have setup the "Default Parameter Encoding" in "Apache Sling Request Parameter Handling" to UTF-8 , as shown in below screenshot.

But the encoding is not working.

Could you please tell me how to change this one ?