Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to print value in textarea in jsp

Tags:

jsp

         <% 
       out.print("<textarea name='test' id='test'value='"+uabout+"'></textarea>");

            %>

is not working.is there a syntax error.

like image 856
Deep Avatar asked Mar 27 '11 07:03

Deep


People also ask

Does textarea has value attribute?

<textarea> does not support the value attribute.

How to make input textarea in HTML?

To create a multi-line text input, use the HTML <textarea> tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows. Specifies that on page load the text area should automatically get focus.

Which defines textarea?

The <textarea> tag defines a multi-line text input control. The <textarea> element is often used in a form, to collect user inputs like comments or reviews. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier).


1 Answers

You can use this code in scripting:

<textarea name='test' id='test'><%=uabout %> </textarea>

OR using JSTL

<textarea name='test' id='test'><c:out value="${uabout}" /> </textarea>

Also, there is no value attribute in textarea tag.

like image 161
Bhanu Krishnan Avatar answered Oct 14 '22 00:10

Bhanu Krishnan