Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Apache Sling JSP Script Handler setting for ‘Trim Spaces’

anands82757572
Level 2
Level 2

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

1 Accepted Solution
kautuk_sahni
Correct answer by
Community Manager
Community Manager

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?

View solution in original post

1 Reply
kautuk_sahni
Correct answer by
Community Manager
Community Manager

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?

View solution in original post