RoseIndia Struts 2 Tutorial and Online free training helps you learn new elegant Struts 2 Framework with examples. Struts 2 is very elegant and flexible front controller framework based on many standard technologies like Java Filters, Java Beans, Resource
Ads
TutorialsRoseIndia Struts 2 Tutorial and Online free training helps you learn new elegant Struts 2 Framework with examples. Struts 2 is very elegant and flexible front controller framework based on many standard technologies like Java Filters, Java Beans, ResourceBundles, XML etc.
Struts 2 Training! Get Trained Now!!!
Why Struts 2
The new version Struts 2.0 is a combination of the Sturts action framework and
Webwork.
Validations using Struts 2 Annotations
In this section we are going to validate our login application using Annotations
in Action class. Our current login application does not validate the user
against the database.
More Struts Validator Examples
User input validations are an integral part
of any web application. With the release of Struts 2, validation are now much
easy and robust. Struts 2 support Ajax based and even server side validations.
Connecting to MySQL Database in Struts 2 (Struts 2
MySQL)
In this section, You will learn to connect the MySQL database with
the struts 2 application.
Rich Editor
Example
In this section, you will learn how to create pagination in struts 2.
Validate TextArea
In this section, you will learn how to validate your text area in struts 2. A text area
contains 1 to 250 characters. It cann't support "null" value.
Struts 2 Tags
Struts 2
Tags Examples (Generic Tags)
Struts 2 tags tutorials and examples.
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 as if, else and
iterate.).
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.
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.
Generator
Tag (Control Tags) Using Count Attributes
In this section, we are going to describe the generator tag using
the count
attributes.
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.
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 or java.util.Iterator.
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 merge iterator causes each merge iterator to
have a chance to expose its elements, subsequently next call allows the
next iterator to expose its element.
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.
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 indicates the number of entries to be set
in the resulting subset iterator.
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).
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.
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 confirms to the
JavaBeans specification.
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.
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.
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.
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.
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.
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.
Struts 2 Tags (UI Tags) Examples
Form Tags Examples
Auto
Completer Example
In this section, we are going to describe the autocompleter tag. The
autocompleter tag always displays a dropdown list with the options that have at
least a partial match with entered text in the textbox. If the user clicks on
the dropdown button then all options shown in the dropdown list.
Checkbox Tag
(Form Tag) Example
In this section, we are going to describe the checkbox tag. The
checkbox tag is a UI tag that is used to render an HTML input
element of type checkbox, populated by the specified property from the
ValueStack.
Checkboxlist
Tag (Form Tag) Example
In this section, we are going to describe the checkboxlist tag. The
checkboxlist tag is a UI tag that creates a series of checkboxes from a
list. Setup is like <s:select /> or <s:radio />, but creates
checkbox tags.
Combobox Tag
(Form Tag) Example
In this section, we are going to describe the combobox tag. The
combo box is basically an HTML INPUT of type text and HTML SELECT
grouped together to give you a combo box functionality.
Datetimepicker
Tag (Form Tag) Example
In this section, we are going to describe the datetimepicker tag.
The datetimepicker tag is a UI tag that is used to render a date/time
picker in a dropdown container.
Doubleselect
Tag (Form Tag) Example
In this section, we are going to describe the doubleselect tag. The
doubleselect tag is a UI tag that renders two HTML select elements with
second one changing displayed values depending on selected entry of
first one.
File Tag (Form Tag)
Example
In this section, we are going to describe the file tag. The file
tag is a UI tag that renders an HTML file
input element achieved through browsing.
Form Tag Example
In this section, we are going to describe the form tag. The form
tag is a UI tag that renders HTML an input form.
Label Tag (Form
Tag) Example
In this section, we are going to describe the label tag. The label
tag is a UI tag that is used to render an HTML LABEL that allows to
output label:name type of combinations that has the same
format treatment as the rest of UI controls.
Optiontransferselect
Tag (Form Tag) Example
In this section, we are going to describe the Optiontransferselect
tag. The Optiontransferselect tag is a UI tag that creates an option
transfer select component.
Optgroup Tag
(Form Tag) Example
In this section, we are going to describe the optgroup tag. The
optgroup tag is a UI tag that creates an optgroup component which needs
to reside within a select tag <s:select>
.
Password Tag
(Form Tag) Example
In this section, we are going to describe the password tag. The
password tag is a UI tag that renders an HTML input tag of type
password.
Radio Tag (Form
Tag) Example
In this section, we are going to describe the radio tag. The radio
tag is a UI tag that renders a radio button input field.
Reset Tag (Form
Tag) Example
In this section, we are going to describe the reset tag. The reset
tag is a UI tag that is used with the form tag to provide
form resetting.
Select Tag (Form
Tag) Example
In this section, we are going to describe the select tag. The select
tag is a UI tag that is used to render an HTML input tag of type select.
Submit Tag (Form
Tag) Example
In this section, we are going to describe the submit tag. The submit
tag is a UI tag that is used to render a submit button. The submit tag
is used with the form tag to provide asynchronous form
submissions.
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.
Textfield Tag
(Form Tag) Example
In this section, we are going to describe the textfield tag. The
textfield tag is a UI tag that is used to render an HTML input field of
type text.
Updownselect
Tag (Form Tag) Example
In this section, we are going to describe the updownselect tag. The
updownselect tag is a UI tag that creates a select component with
buttons to move up and down the elements in the select component.
Non-Form UI Tags
Actionerror
and Actionmessage Tags (Non-Form UI Tags) Example
In this section, we are going to describe the actionerror and
actionmessage tags. The actionerror tag is a UI tag that renders
action errors (in the jsp pages.) if they exists while the actionmessage
tag renders action messages if they exists.
Fielderror Tag
(Non-Form UI Tags) Example
In this section, we are going to describe the fielderror tags. The
fielderror tag is a UI tag that renders field errors if they exists.
TabbedPanel (Ajax
Tag) Example
In this section, you will learn about the tabbedPanel tag. This is an Ajax
component, where each tab is either a local content or a remote content
(refreshed each time when user selects that tab).
Accessing Session
Object
In this section, we will develop a simple application to access the
framework resources like the session object, session context and the last
accessed session time.
Access
Request and Response
In this section, you will learn to develop an application that accesses the
request and response object in struts 2 application.
Struts 2 Tools
Download Source Code
of Struts 2 Tutorial
Posted on: February 22, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles
Advertisements
Ads
Ads
Discuss: Struts 2 Tutorial View All Comments
Post your Comment