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


 
  
 
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
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Struts
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Struts 2 Tags Examples

                         

In this section we are discussing the Struts 2 tags with examples. Struts 2 tags provides easy to use custom tags to help the developers to make GUI for their struts 2 based applications.

In Struts 2 there are many easy to use tags and the learning process for these tags are also easy. 

There are two types of tags in Struts 2, Control Tags and Data Tags.

We will show you all the tags with good working examples. Please browse the following links to learn Struts 2 tags in detail.

   

Struts 2 Tags:

  1. Control Tags
    1. Control Tags-If / Else If / Else
      In this section we are going to discuss the various control tags ( The Control Tags are used for flow control, such if, else and iterate.).
         
    2. Append Tag (Control Tags) Example
      In this section, we are going to describe the append tag . The append tag is a generic tag that is used to merge multiple iterators into one iterator.
         
    3. Generator Tag (Control Tags) Example
      In this section, we are going to describe the generator tag . The generator tag is a generic tag that is used to generate iterators based on different
      attributes passed .
           
    4. Generator Tag (Control Tags) Using Count Attributes
      In this section, we are going to describe the generator tag using the
      count attributes.
            
    5. Generator Tag (Control Tags) Using an Iterator with Id Attributes
      In this section, we are going to describe the generator tag using the id attributes.
          
    6. Iterator Tag (Control Tags) Example
      In this section, we are going to describe the Iterator tag. Iterator tag is used to iterate over a value. An iterable value can be either of: java.util.Collection, java.util.Iterator.
          
    7. Merge Tag (Control Tags) Example
      In this section, we are going to describe the merge tag . The merge tag is a generic tag that is used to  merge iterators. The successive call to the merged iterator causes each merge iterator to have a chance to expose its element, subsequently next call allows the next iterator to expose its element.
          
    8. Subset Tag (Control Tags) Example
      In this section, we are going to describe the subset tag . The subset tag is a generic tag that  takes an iterator and outputs a subset of it. It delegates to org.apache.struts2.util.SubsetIteratorFilter internally to perform the subset functionality.
           
    9. Subset Tag (Control Tags) Example Using Count
      In this section, we are going to describe the subset tag using the count  parameter. The count parameter indicate the number of entries to be set in the resulting subset iterator.
         
    10. Subset Tag (Control Tags) Example Using Start
      In this section, we are going to describe the subset tag using the start parameter. The start parameter is of integer type. It indicates the starting index (eg. first entry is 0) of entries in the source (needed to make available as the first entry in the resulting subset iterator).
              
  2. Data Tags

    1. Action Tag (Data Tag) Example
      In this section, we are going to describe the action tag . The action tag is a generic tag that is used to
      call actions directly from a JSP page by specifying the action name and an optional namespace.
           
    2. Bean Tag (Data Tag) Example
      In this section, we are going to describe the Bean Tag . The Bean tag is a generic tag that is used to instantiates a class that conforms to the JavaBeans specification.
           
    3. Date Tag (Data Tag) Example
      In this section, we are going to describe the Date tag .The date tag allows to format a Date in a quick and easy way. User can specify a custom format (eg. "dd/MM/yyyy hh:mm"), can generate easy readable notations (like "in 2 hours, 14 minutes"), or can just fall back on a predefined format with key 'struts.date.format' in the properties file.
           
    4. Include Tag (Data Tag) Example
      In this section, we are going to describe the include tag . The include tag is a generic tag that is used to include a servlet's output (result of servlet or a JSP page) to the current page.
          
    5. Param Tag (Data Tag) Example
      In this section, we are going to describe the param tag. The param tag is a generic tag that is used to parameterize other tags. For example the include tag and bean tag. The parameters can be added with or without a name as a key.
          
    6. Set Tag (Data Tag) Example
      In this section, we are going to describe the Set tag . The set tag is a generic tag that is used to assign a value to a variable in a specified scope.
           
    7. Text Tag (Data Tag) Example
      In this section, we are going to describe the text tag. The text tag is a generic tag that is used to render a I18n text message.
            
    8. Property Tag (Data Tag) Example
      In this section, we are going to describe the property tag . The property tag is a generic tag that is used to get the property of a value, which will default to the top of the stack if none is specified.

                         

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 
Latest Searches:
program for marklist
export database data i
set cell value JTable
difference between jdk
convert string to stin
jasper report
pega
text box character val
pass values into strin
Style
jsp combo box my sql
Photoshop Basics Kodak
simple multiplication
clear values from a fo
Flash Animation Animat
How to write JSP
input in java
Jasper Reports
java string
change color in JTabl
���?����
breakÑ?â?£?Ñ?â???Ñ?â??
netbeans hibernate
ร?ย  in struts
connection java to mys
break��?��?�
date format
�����?��
SCHOOL MANAGEMENT PROJ
shell
TYPE_SCROLL_INSENSITIV
Building a Simple EJB
spring hibernate ehcac
struts layout tags
Create table and inser
DynaValidateForm
panelgrid with its ren
form bean
xmlstream
serialisable
jsp trim char
SUBMITTING MULTIPLE FO
jsp applet netbeans
checking values in dat
create excel using jav
Java EJB eclipse xDocl
ASP.NET .NET File Uplo
jsp Insert data in mys
Class Variables and Me
Combattons la programm
login session servlet
creating batch in sql
JSP and MS access
Error handling in stru
ะ�??ะ ย�ะ
page attributes
mysql insert statement
jQuery To Slide Effect
Convert Integer to Flo
count row in resultset
jsp export xml
Hash Function in Java
HTML Image Maps Client
java program to find s
VB Project
weblogic portal
jsp export to pdf
struts if else
richfaces
apache wicket
Image with mouse drag
datetimepicker and css
nested tags in a xml f
Flash Audio Animated G
jdbc and jsp
dispatcher
log4j
prime
drill down in jfree ch
unchained exceptions
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  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

Indian Software Development Company | iPhone 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.