File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Regarding Text Area Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding Text Area" Watch "Regarding Text Area" New topic

Regarding Text Area

Anish Nagraj

Joined: Feb 27, 2006
Posts: 20
I am able to write the contents in the textarea to the browser but I am not able to retain the line breaks.

How can I write the contents of a textarea to the browser retaining the line breaks as it is in the text area ?

Is there any attribute for <html:textarea> tag in JSP like the one in Html which is as follows :
<textarea wrap="hard">
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

The <html:textarea> tag is not a standard JSP tag; it is a Struts tag. As such, moving this to the Struts forum.

[Asking smart questions] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm afraid there's no wrap attribute in <html:textarea>. You will probably end up having to use the HTML version of the tag. Just make sure the name attribute matches the property of the ActionForm bean you're using and make sure you code a value attribute with a <bean:write> tag that gets the value from the ActionForm bean.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Regarding Text Area
It's not a secret anymore!