Wrap a long text with paragraph spaces in JSP
918178Jul 3 2012 — edited Jul 3 2012Hi,
In Jsp, I wanted to display two paragrpahs like this.
THIS IS A TEST WITH DIARY TEXT. Para 1
THIS IS THE SECOND LINE.
A SINGLE BLANK LINE PRECEDES THIS TEXT,
TWO BLANK LINES FOLLOW THIS LINE.
THERE SHOULD BE TWO BLANK LINES BEFORE THIS ONE.
and a paragraph with long text to be displayed should be wrapped in the browser.
Para 2
THIS IS A TEST. THIS PARAGRAPH SHALL NOT HAVE ANY LINE SPACES IN BETWEEN.THE PARA BEGINS HERE.THE PARA BEGINS HERETHE PARA BEGINS HERETHE PARA BEGINS HERETHE PARA BEGINS HERETHE PARA BEGINS HERETHE PARA BEGINS HERETHE PARA BEGINS HERE.
The above paragraph should be wrapped while displaying in browser. I used
P STYLE="word-wrap:break-word;width:100%;left:0" but this is supporting the para 2 only and para1 is displayed without spaces in between the lines.
If I take the above tag from the jsp, then para 1 is supported and not para 2. Para 2 is displayed as long text.
Can anyone help me to find which will support two type of paragraphs in browser.
It should retain the spaces in between the lines
And also it should wrap the long text while displaying in browser.
I am not sure if this question is relevant in this forum. But it is since JSP I posted here.
Edited by: 915175 on Jul 2, 2012 10:10 PM