Solved

How can I format text?

Posted on 2004-08-01
2
180 Views
Last Modified: 2010-04-01
I have a form that has several fields in it.
One field is a textarea (VarChar) field, that the user can paste many lines of data into.
Then this form actions to a JSP that writes the record to a DB2 table.
Just like this question area for EE.

My problem is that when the user paste their data, and after it gets written to the DB2 table, I then display the record for a technician to work the request, when the technician views the record it all runs together.

How can I change my code to display the pasted data just like it was put in by the customer?
0
Comment
Question by:g118481
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
rrz earned 150 total points
ID: 11687866
>then display the record for a technician to work the request, when the technician views the record it all runs together.          
Does the source code for the display page have the line breaks that the user entered in the textarea ?  If yes, then just use the HTML tags <pre>   </pre> .
If not, then try adding wrap attribute to textarea tag. Try something like  
<textarea  wrap="hard"  cols="yy"  rows="xx">
0
 
LVL 1

Author Comment

by:g118481
ID: 11687929
There are line breaks from the textarea form field.
However, the record display for the technician is not done using the textarea form field.
I am simply outputing it from a select query.

(i.e.   <%= REQTEXT %>)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xjc and jaxb 2 99
Java Exception example issues 11 84
struts spring hibernate example 12 143
how to debug htl and js pages 8 78
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question