Prevent HTML Removing Successive spaces <p>I have an issue in a JSP page where I have to display a generated message onscreen based on a string. It all works fine until one of the account numbers contains two spaces.</p> <p>So, I have this HTML:</p> <pre><code> &lt;logic:notEqual name="migrationsMessage" value=""&gt; &lt;div style="color:Red;font-weight:bold"&gt; &lt;bean:write name="solasDetailsForm" property="migrationsMessage"/&gt; &lt;/div&gt; &lt;/logic:notEqual&gt; </code></pre> <p>When the field migrationsMessage contains this:</p> <pre><code>&lt;input type="hidden" name="migrationsMessage" value="A 123456W has migrated to A 123456."&gt; </code></pre> <p>The output on the screen is this:</p> <pre><code>“A 123456W has migrated to A 123456.” </code></pre> <p>The second space after the first A is removed. I tried to alter the style to be this but it didn't help:</p> <pre><code> &lt;logic:notEqual name="migrationsMessage" value=""&gt; &lt;div style="color:Red;font-weight:bold;white-space:pre"&gt; &lt;bean:write name="solasDetailsForm" property="migrationsMessage"/&gt; &lt;/div&gt; &lt;/logic:notEqual&gt; </code></pre> <p>Any ideas what is going wrong?</p>