aspose file tools*
The moose likes JSP and the fly likes Break Down Paragraph Text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Break Down Paragraph Text " Watch "Break Down Paragraph Text " New topic
Author

Break Down Paragraph Text

Bernard Bobinski
Greenhorn

Joined: Aug 30, 2004
Posts: 14
My department has a custom software application that breaks down a text paragraph into lines that contain 80 characters or less. I need to write a custom application using JSP to do the same thing. Any help would be appreciated.

i.e. Text Area (Paragraph)

PO John Smith reports responding to the above location and checking the aforementioned building. All appears secure at this time.

Stored in the SQL Database it would appear �

Line 1: PO John Smith reports responding to the above location and checking the
Line 2: aforementioned building. All appears secure at this time.


Respectfully,<br /> <br />Bernard J. Bobinski
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61205
    
  66

When the form containing the text area is submitted to its servlet, simply use the String.substring() method to break the text area submission into 80-character chunks for storage.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
icredes
Greenhorn

Joined: May 03, 2005
Posts: 26
I took this as a personal challenge... so I hope it helps...
Bernard Bobinski
Greenhorn

Joined: Aug 30, 2004
Posts: 14
Bear and James,

Thank you very much for the help. You guys got me started in the right direction. This is the code that I eventually ended up using.

 
jQuery in Action, 2nd edition
 
subject: Break Down Paragraph Text