wood burning stoves 2.0*
The moose likes Servlets and the fly likes textarea in Jsp shows fisrt line indented always? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "textarea in Jsp shows fisrt line indented always?" Watch "textarea in Jsp shows fisrt line indented always?" New topic
Author

textarea in Jsp shows fisrt line indented always?

wei Qiao
Greenhorn

Joined: Jun 19, 2000
Posts: 23
I had this problem happened to me, the text area I used in one Jsp page to display a string field retrieved from datebase(the string is trimed before displayed). The first line is always indented for about 10 char long.
Can this be fixed? I set align=left already. Also the Text area is within a table cell.
Thanks!
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
Is there a space between the opening and closing textarea tags?
<textarea> </textarea>
-OR-
<textarea>
</textarea>
Try placing the tags together and on the same line.
David
Sun Certified Programmer for the Java2 Platform
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
ya it can be fixed ..
if u see the generated html
then it will be someting like this
<textarea>
ur text starts here</textarea>
see that there is no space between
<textarea></textarea>
if it is then u will see space in between
hope it will help u ..
wei Qiao
Greenhorn

Joined: Jun 19, 2000
Posts: 23
yes, there is space,
<CODE>
<td>
<TEXTAREA NAME="description" COLS=40 ROWS=6 readonly>
<%=folioDescs[0].getFolioDescription().trim() %>
</TEXTAREA>
</td>
</CODE>
is it wrong? or should be placed as:
<CODE>
<td>
<TEXTAREA NAME="description" COLS=40 ROWS=6 readonly><%=folioDescs[0].getFolioDescription().trim() %></TEXTAREA>
</td>
</CODE>
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
Try the second option and see if that helps. Maybe the returns are being interpreted into spaces.
David
Sun Certified Programmer for the Java2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: textarea in Jsp shows fisrt line indented always?