Skip to main content

Posts

Showing posts with the label strus2 tutorial

Struts2 Video Tutorial Part1

Introduction to Struts 2 Framework

Struts2 Video Tutorial Part2

Struts 2 Simple Example and Configuration

Struts2 Video Tutorial Part3

Struts 2 MVC Framework Session 3 | Struts 2 actions | ActionSupport | ModelDriven | wildcards    

Struts2 Video Tutorial Part4

Struts 2 Interceptors | Struts 2 Framework Session 4 | Interceptors   

Struts2 - Password Tag (Form Tags)

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. Add the following code snippet into the struts.xml file. struts.xml <action name="passwordTag"> <result>/pages/uiTags/passwordTag.jsp</result> </action> Create a jsp using the tag <s:password> . It renders an HTML input tag of type password. passwordTag.jsp <%@ taglib prefix="s" uri="/struts-tags" %> <html>   <head>   <title>Password Tag Example!</title>    </head>   <body>   <h1><span style="background-color: #FFFFcc">Password Tag Example! </span></h1>  <s:form>  <s:password label="Enter Password" name="password" size="10" maxlength="8" />   </s:form>   ...

Datetimepicker 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. A stand-alone DateTimePicker widget that makes it easy to select a date/time or increment by week, month, and/or year. It is possible to customize the user-visible formatting with either the 'formatLength' (long, short, medium or full) or 'displayFormat' attributes. By default current locale will be used. Add the following code snippet into the struts.xml file. struts.xml <action name="datetimepickerTag" class="net.struts2.includeTag">    <result>/pages/uiTags/datetimepickerTag.jsp</result> </action> Create an action class as shown: includeTag.java package net.struts2; import com.opensymphony.xwork2.ActionSupport; import java.util.*; public class includeTag extends ActionSupport {   private Date m...