Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Textarea Tag (Form Tag) Example 
 

In this section, we are going to describe the textarea tag.

 

Textarea Tag (Form Tag) Example

                         

In this section, we are going to describe the textarea tag. The textarea tag is a UI tag that is used to render an HTML textarea. 

Add the following code snippet into the struts.xml file.
struts.xml

<action name="textareaTag">
       <result>/pages/uiTags/textareaTag.jsp</result>
</action>

Create a jsp using the tag <s:textarea > that renders an HTML textarea tag.

<s:textarea label="Description" name="description" cols="15" rows="10" /> tag displays an HTML textarea with label equal to Description, column value=15 and row value=10.
textareaTag.jsp

<%taglib prefix="s" uri="/struts-tags" %>

<html>
  <head>
    <title>Textarea Tag Example</title>
    <link href="<s:url value="/css/main.css"/>" rel="stylesheet"
          type="text/css"/> 
  </head>
  <body>
  <h1><span style="background-color: #FFFFcc">Textarea Tag Example!</span></h>
  <s:form>
    <s:textarea label="Description" name="description" cols="15" rows="10" />
  </s:form>
  </body>
</html>

Output of the textareaTag.jsp:

                         

» View all related tutorials
Related Tags: html text ui sed textarea tag tar render tex to ext e area use ml m end s at htm

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

4 comments so far (
post your own) View All Comments Latest 10 Comments:

how can i align the text in the text area? for ex. i want the text to be right justified? thank you! :)

Posted by Angel on Tuesday, 04.22.08 @ 17:50pm | #57512

How to get the length of textarea in Struts 2

Posted by Senthil Kuamr S on Thursday, 01.17.08 @ 15:36pm | #45436

I cannot get the wrap attribute to work... What is the proper syntax for the wrap attribute to work???

Posted by Derek Closta on Wednesday, 09.26.07 @ 20:34pm | #29730

Hi, I try to fill the textarea, but it won't work:

<s:form action="SchemaEditor" method="POST" enctype="multipart/form-data">
<s:textarea name="schemaBox" value="" label="Schema" cols="30" rows="15" />
<s:submit />
</s:form>

Posted by Testy on Wednesday, 09.19.07 @ 16:53pm | #27851

Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.