Formating reports retun as entered

When I populate an html field with text  now for example

    I hit enter 2 times you can see the white space

My report is as follows:
When I populate an html field with text  now for example I hit enter 2 times you can see the white space

I want my report to show the white space.  Di I need to run the field through some kind of JS or class.  I am generating the report from a jsp pulling from oracle.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is a HTML question, not a JSP question. The two things you need to use are
1) the wrap attribute in the textarea element  
2) the <pre> </pre> tags to display exactly what is sent to the browser.  

Please test the example below here in all browsers that you want to target.
Textarea test of wrap attribute
<form action="wrapTest.jsp">
<textarea name="ta" cols="20" rows="4" wrap="hard"></textarea>
<input type="submit" value="Submit">

Test !

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
slightwv (䄆 Netminder) Commented:
The PRE tag is the preferred way but if you cannot use it for some reason you can always do a string replace in the Oracle call to replace the CR/LF with <br/>
gazdzidAuthor Commented:
can you tell me the cause when using wrap within the tags as seen below gives a warning

" Iwak0043E Undifined attribute name (wrap)."

<textarea name="CONTACT_ADDR_DESCR" id="CONTACT_ADDR_DESCR" onchange="trim('CONTACT_ADDR_DESCR', this.value)" cols="70" rows="3" wrap="hard" onkeydown="limitText(this.form.CONTACT_ADDR_DESCR,this.form.countdown,2000);" onkeyup="limitText(this.form.CONTACT_ADDR_DESCR,this.form.countdown,2000);"  >Location Specific - Directions</textarea></td>
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Which browser are you using ?
The wrap attribute is not standard HTML.  Did you try leaving it out ?  
There might be a way to do it with CSS.  You could ask at
gazdzidAuthor Commented:
I did try leaving it out and added  <pre> to the report.  I received the same warning.  Then I duplicated the field outside of the <table> the warning went a way.  can I have pre inside of a table?
gazdzidAuthor Commented:
Hey thanks it works!!
>can I have pre inside of a table?  
Yes.  Thanks for the points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.