Services | Updates | Contact
Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
Common Interview Questions Page - 4
Question: 14. Are you a team player? Answer: Working together as a team is the key point in achieving greater goal th
 
Shuffling the Element of a List or Array
In this section, you will learn about shuffling the element of a list or array.
 
More Tutorials...


    Loan Information     Struts     Open Source

Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

 
 
Struts

 
Comments
 
 

 

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.

 

                         

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

Current Comments

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

how to set dynamic value in

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

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

an error occur when i am trying to run "javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection"

Posted by subash on Monday, 02.18.08 @ 15:48pm | #48881

Can u put some code snippets for all tags. like html,bean,template tags.

Posted by ramu on Monday, 02.11.08 @ 11:28am | #47883

Can you please send the code snippet for the <html:select> tag in Java

Here is the Problem for Us

where are displaying some entities in the JSP page by using the <html:select> tag

but we are not viewing the all entites in the select tag.

We are creating the 5000 entites in the database

But it is not comming to the database.

Here in the select tag we want the scorll bar it is not comming

we want both the horizantal and vertical scrollbars.

Can u please send me the code snippet fot this.

Thanks and Regards
Niranjan Kumar Ch.

Posted by Niranjan on Friday, 12.7.07 @ 23:02pm | #41566

<html:link href="commandSearch.do?searchType=commandName&searchName="<%=cmdName%>"&selNavObjId=comm|search" scope="request">My Options</html:link>

i am not receiving value of: <%=cmdName%>....?
why...? any other way to receive the value of cmdName..? pls help me..?

Thanks,
Sathia

Posted by sathiyamoorthy on Friday, 12.7.07 @ 11:11am | #41509

Online Buying Viagra Cialis and other meds: guest 08.10.2007. Taking Viagra without ED ... Viagra Soft Tabs. $1.88. order online buy Viagra Soft Tabs online ... <a href="http://suppernewviagra.0catch.com/index.html">viagra pill for sale </a> http://suppernewviagra.0catch.com/map.html
WASHINGTON (AP) -- Users of Viagra and other impotence drugs are being warned ... The impotence drugs Viagra, Cialis and Levitra will bear the warnings. ... <a href="http://suppernewviagra.0catch.com/viagra&25.html">white oval 93 58 </a> http://suppernewviagra.0catch.com/viagra&28.html
Buy Viagra online to treat male erectile dysfunction from our legal UK registered pharmacy online. Buy Viagra online with a prescription from our UK ... <a href="http://suppernegenericwviagra.0catch.com/viagra&20.html">pill viagra viagradrugs.net </a> http://suppernegenericwviagra.0catch.com/viagra&21.html
Buy Viagra online to treat male erectile dysfunction from our legal UK registered pharmacy online. Buy Viagra online with a prescription from our UK ... <a href="http://suppernegenericwviagra.0catch.com/viagra&12.html">blue 347 </a> http://suppernegenericwviagra.0catch.com/viagra&36.html

Posted by Im facking mayself on Thursday, 12.6.07 @ 15:55pm | #41438

how to use base tag

Posted by seenu on Wednesday, 12.5.07 @ 12:08pm | #41338

Does <html:message> exist? seems not, it is <bean:message>

Posted by Kevin Tse on Wednesday, 11.21.07 @ 21:52pm | #38216

Please include examples also to make a clear view fo using these tags

Posted by Ankur Malik on Monday, 11.19.07 @ 14:34pm | #37811

Please help me,
How to upload the file in struts by using <html:file> and how to get that file in the JSPs

Posted by somu on Sunday, 11.18.07 @ 00:24am | #37643

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

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.

  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

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

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

Copyright © 2007. All rights reserved.