Search code examples
javahtmljspscriptlet

href parameter : scriplet result truncated at first white space in a jsp


I use this scriplet code in a jsp, it's a huge and old webapp so we don't have enough time to make it with taglib etc.

buffer.append("<TD> <b><A href= ...title="+MCode.getMessage(sMillesime, true) +">"

The problem is that the variable is truncated at first whitespace, html generated for "test blabla" message is :

<TD> <b> <a href = ... title="test" blabla>

So only the first word is in the bubble. Any idea?


Solution

  • try like this

    buffer.append("<TD> <b><A href= ...title=\""+MCode.getMessage(sMillesime, true) +"\">")