Struts 2 TextArea Tag Example

struts2-thumbnail

Struts 2 TextArea field is helpful for entering the multiple lines in the input box. It is similar to the textfiled tag, but in the textfield tag only one line can be entered. Lets look at the example. 1. Action Class 2. TextArea Tag Example TextArea.jsp Result.jsp 3. Struts.xml 4. TextArea Tag Demo If you […]

Struts 2 Hidden Tag Example

struts2-thumbnail

Struts 2 Hidden Tag is helpful for passing the hidden values from one page to another page. In the latest web development there is very less need for using this kind of tags for the functionality. If your framework is not handling the values by default, you need to define the hidden fields and then […]

Struts 2 Select Tag Example

struts2-thumbnail

Struts 2 Select tag is helpful for implementing the drop down list where user can select one value from the list. Either these values can be send from the bean or it can be defined in the select tag itself. This tutorial shows a simple example to implement this tag. Lets look at the below […]

Struts 2 Radio Tag Example

struts2-thumbnail

Struts 2 s:radio button tag helps you to select only one value from the list of options. Unlike check boxes which offer multiple selection possible, radio buttons are useful for selecting only one value from the group of options. This radio button tag example provides very simple demonstration. Lets look at these code snippets. 1. […]

Struts 2 CheckBox Tag Example

struts2-thumbnail

Struts 2 s:checkbox tag is helpful for selcting the multiple options in a web page. The values for each field is stored as “true” or “false” based on the selection status of each field. The data type of check box filed is of boolean. The below example shows a very simple example with single check […]

Struts 2 Password Tag Example

struts2-thumbnail

Struts 2 s:password is the equivalent of input password input box in the HTML. This tutorial shows how to take the input and password from a JSP file and pass on to the next page using Struts 2 Action class. Lets see the example. 1. Action Class 2. Password Tag Example Input.jsp Result.jsp 3. Struts.xml […]

Struts 2 TextField Tag Example

struts2-thumbnail

Struts 2 s:textfield is the equivalent of input text box in the HTML. This tutorial shows how to take the input from a JSP file and pass on to the next field using Struts 2 Action class. Lets see the example. 1. Action Class A simple action class for taking the employee name from user. […]

Struts 2 Include Tag Example

struts2-thumbnail

Struts 2 Include Tag helpful for directly inserting another JSP or HTML page to the current page. This tutorial shows how to use the include tag. 1. Action Class 2. Include Tag Example IncludeTag.jsp Output.jsp 3. Struts.xml

Struts 2 Push Tag Example

struts2-thumbnail

Struts 2 Push Tag pushes the values to top of the stack. Once the push tag pushes the values, then those fields can be easily accessed without the bean references. Lets see the below example for how to use the push tag. 1. Action Class and Bean Struts2HelloWorldAction.java UserDetails.java 2. Push Tag Example 3. Struts.xml […]

Struts 2 Property Tag Example

struts2-thumbnail

Struts 2 Property Tag is most commonly used by the struts applications. It is simply taking the field or property values from the bean instances or from the context variables. This tag can be used either as sub element of another tag or outside any other tags. This tutorial shows how to use the s:property […]

Close
Please support the site
By clicking any of these buttons you help our site to get better