aspose file tools*
The moose likes Java in General and the fly likes Confused...printing a description as entered by the user. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Confused...printing a description as entered by the user." Watch "Confused...printing a description as entered by the user." New topic
Author

Confused...printing a description as entered by the user.

Jil Nautilus
Greenhorn

Joined: Jun 09, 2004
Posts: 13
Hi,

Im using a text area in a html(in a jsp) form to get a discription and address from users.
<textarea name="Address" cols="21" rows="4" ></textarea></td>
Im writing this on a text file with other details in the form using java.
Then Im previewing those values by reading from that text file.
after the conformation of the user Im storing those values in the db (sql2k).
when I want to display the discription from the db it displays as a single line and its realy odd to see.

how can I preview a description as same as user entered .

I want to print the previewing page as well.Im reading the description to a String variable and Im just doing

<textarea name="textarea3" rows="5" readonly><%=varAddress%></textarea>
This is OK for the previewing part but I cant print this without the textarea border.

Pls help me on this.
Thanx in advance for any help.
Jil
Bryon Phinney
Greenhorn

Joined: Aug 17, 2001
Posts: 13
In reference to this issue:
"when I want to display the discription from the db it displays as a single line and its realy odd to see."

I had to use the wrap attribute of "hard" to force line breaks at my column length. I believe this will include the line break in the String
<textarea name="additionalInfo" cols="65" rows="20" wrap="hard"> </textarea>
Jil Nautilus
Greenhorn

Joined: Jun 09, 2004
Posts: 13
Thanks a lot Brayan
It works.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Confused...printing a description as entered by the user.