In my Liferay Spring MVC portlet new lines on Text Area do not work, while in a plain Spring MVC context they are working.
Plain Spring MVC
Text area tag is <form:textarea path="theTextArea"/>
User input contains three separate lines:
aaa
bbb
ccc
On submit when I inspect the bean at server side it contains aaa\r\nbbb\r\nccc and the same is saved in the database.
On my view page I am using <pre><c:out value="${theBean.theTextArea}"></c:out></pre> and I see three lines on page.
But the same is not working in the Liferay Spring MVC portlet. New line are converted to blank space:
aaa
bbb
ccc
is converted to aaa bbb ccc.
I don't know how to solve this problem in Liferay.
The liferay spring mvc jsp code
<form:textarea
path="titleofEvent"
id="titleofEvent"
name="titleofEvent"
class="input-large" rows="" cols="" maxlength="600" tabindex="1"/>