Apache Sling JSP Script Handler setting for ‘Trim Spaces’ | Community
Skip to main content
Level 2
June 5, 2018
Solved

Apache Sling JSP Script Handler setting for ‘Trim Spaces’

  • June 5, 2018
  • 1 reply
  • 1203 views

Hello All,

I am on AEM 6.3.

In an attempt to cleanup the html output I enabled the trimspaces option in Config Mgr on the publisher.

This did not have any effect.

I read through on the internet and saw the following : AEM 6.1 - How to Trim Whitespaces

Tried the steps, no result.

In the forum I did come across threads stating this is a bug and not supported.

Is this correct? Has anyone for this working for them?

Thank you.

Anand

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 kautuk_sahni

If this is for HTL, then this is a known limitation:- https://issues.apache.org/jira/browse/SLING-4443

Currently, there is no option to trim white space when using HTL.

It is always possible to implement a Servlet Filter in case we want this sooner than later. (google returned [0] for that)

[0] http://balusc.omnifaces.org/2007/12/whitespacefilter.html

Opinion from another expert is:-Why do you want to trim the white spaces? White space shouldn’t be a big deal in terms of bytes being requested over the wire, because you should use always use mod_inflate for any text file.Why do you want to trim the white spaces?

1 reply

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
June 6, 2018

If this is for HTL, then this is a known limitation:- https://issues.apache.org/jira/browse/SLING-4443

Currently, there is no option to trim white space when using HTL.

It is always possible to implement a Servlet Filter in case we want this sooner than later. (google returned [0] for that)

[0] http://balusc.omnifaces.org/2007/12/whitespacefilter.html

Opinion from another expert is:-Why do you want to trim the white spaces? White space shouldn’t be a big deal in terms of bytes being requested over the wire, because you should use always use mod_inflate for any text file.Why do you want to trim the white spaces?

Kautuk Sahni