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

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials:
 

Software Solutions and Services
 

 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments
 
Struts HTML Tags 
 

Struts HTML Tags Struts HTML Tags Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces. To use the Struts

 

Struts HTML Tags

                         

Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces.

To use the Struts HTML Tags we have to include the following line in our JSP file:

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

above code makes available the tag to the jsp.

 

Struts HTML Tags
<html:message key="thekey"/> Looks up the message corresponding to the given key in the message resources and displays it.
<html:password property="prop" size="10"/> Tag creates the password field. The string is stored in the property named prop in the form bean.
<html:text property="text1" size="5"/> Tag creates the text field. The string is retrieved from and later stored in the property named text1 in the form bean.
<html:submit>Submit</html:submit> Tag creates a submit button with the provided content as the button text. 
<html:reset>Reset</html:reset> Tag creates a reset button with the provided content as the button text. 
<html:errors/> Tag prints all the available error on the page.
<html:file property="fileSelectionBox"/> Tag creates the file upload element on the form. The property must be of the type org.apache.struts.upload.FormFile.
<html:checkbox property="myCheckBox"/> Tag creates check box on the form.
<html:hidden property="hiddenfield"/> Tag creates the hidden html element on the form.
<html:radio value="abc" property="myCheckBox"/> Tag creates the check box on the form.
<html:select multiple="true" property="selectBox"> Tag creates list box on the form. The property selectBox must be an array of supported data-types, and the user may select several entries. Use <html:options> to specify the entries.
<html:textarea property="myTextArea" value="Hello Struts" /> Tag creates the text area on the form.
<html:form action="/Address" method="post"> Tag is used to create the HTML Form for posting the data on the server.
<html:base/> Tag generates the base tag. <BASE ...> tells the browser to pretend that the current page is located at some URL other than where the browser found it. Any relative reference will be calculated from the URL given by <BASE HREF="..."> instead of the actual URL. <BASE ...> goes in the <HEAD> section.
<html:html> Tag renders an HTML <html> Element.

In the Address.jsp we have used some of the above tags. In the future sections I will show you more examples of the Struts HTML tags.

 

                         

» View all related tutorials
Related Tags: c programming apache web com development asp ui framework build application io components make sed get ip hook vi concepts

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

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

when i connect with oracle on netbeans id then comes the error that "The requested resource (Servlet action is not available) is not available."

Posted by kamesh on Friday, 12.12.08 @ 01:49am | #82670

bonjour
je suis débutante dans le domaine struts, je vous adresse ce mail, pour vous demander de l'aide.
mon problème est le suivant : quand je veut accéder à l'une des pages pour tester le struts tutorial j'ai l'erreur suivante :
"
type Rapport d'exception

message

description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.

exception

org.apache.jasper.JasperException: Le fichier "/tags/struts-bean" n'a pas été trouvé
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)




"

je ne sais pourquoi et je ne trouve pas dans votre exemple la partie "/tags/struts-bean" citée dans l'erreur

en attente d'une réponse veuillez accepter mes salutations.
cordialement

Posted by SEMAR on Monday, 12.1.08 @ 06:47am | #82237

how to use select in struts by use a select day or date month year

Posted by sachin on Tuesday, 10.14.08 @ 09:42am | #81065

Hi i am new to struts. I need a help about how to deploy struts and need some sample program.

Posted by Pugalenthi on Thursday, 09.18.08 @ 18:23pm | #80326

Hi all,

i have the code for tooltip for <select>.After selecting option only tooltip is coming.i want the tooltip on mouse over the options.

Is there any possibility???

Thanks & Regards,
Sujatha

Posted by Sujatha on Friday, 09.5.08 @ 17:26pm | #77253

how we get the multiple value select by selectbox on action

Posted by rajeev on Friday, 09.5.08 @ 11:22am | #77222

Hello webmaster, very nice site here, great work!
TomasKell

Posted by TomasKell on Saturday, 05.31.08 @ 21:06pm | #61591

Hi,

It is a very good and nice tutorial.
I am having trouble compiling. I am using RSA to practice this and it does not recognize the Struts classes like Action, Action mapping etc.

Do I need to download the Struts API and configure it with RSA.

Thanks in Advance.
Satish

Posted by Satish on Friday, 05.30.08 @ 23:21pm | #61481

Can any one help me about providing details about development of page navigation using Struts Taglib?

Posted by Sridhara on Wednesday, 05.21.08 @ 09:14am | #60564

how to set dynamic value in

<html:text property="text1" size="5"/>

Posted by shovan on Friday, 04.25.08 @ 12:15pm | #57838

Training Courses
Tell A Friend
Your Friend Name
Website Designing Services
 
Web Designing Packages From $150!
 
Website Designing Company Web Hosting
 
Website Designing Quotation
 
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.