This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Break Down Paragraph Text  RSS feed

 
Bernard Bobinski
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
icredes
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took this as a personal challenge... so I hope it helps...
 
Bernard Bobinski
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!