Solved

How can I format text?

Posted on 2004-08-01
2
178 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with LDAp login using jsp 6 118
unit test DAO layer 1 142
dateFashion java challenge 9 149
using if condition without JSTL 2 115
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 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