3

I use trim-directive-whitespaces option in web.xml

<jsp-config>
    <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <trim-directive-whitespaces>true</trim-directive-whitespaces>
    </jsp-property-group>
</jsp-config>

So I think that jsp result is nice.

But I found seeing bug that jsp result rendering.

for example.

here is part of sample jsp code.

(value1 : abcd, value2: efgh)

<div class="${value1} ${value2}"></div>

result I think: <div class="abcd efgh"></div>

actual result: <div class="abcdefgh"></div>

middle spaces are removed!!

I can understand.

How can I fix it as I thought?

Did I misunderstood?

please help me.

Dongin Min
  • 409
  • 3
  • 5
  • 12
  • 1
    I see suggested solution at http://stackoverflow.com/questions/208736/strip-whitespace-from-jsp-output Using that solution, you would have
    – rickz Apr 20 '17 at 02:13
  • If you are not familiar with it, then see https://en.wikipedia.org/wiki/Non-breaking_space – rickz Apr 20 '17 at 02:23
  • @rickz thank you to your guide. I thought that my question would work normally. But when I thought about it, I started to think it was right to treat it as "& nsbp;" if it was absolutely necessary. – Dongin Min Apr 20 '17 at 06:58

0 Answers0