Struts1 Tags Liberary

Stuts 1.2.x gives following tag libraries to support the program to make jsp of struts application as java codeless jsp. HTML tag library. BEAN tag library. Logic tag library. Nested tag library. Tiles tag library. Templet tag library. Tld files & tag handler class are available in struts-taglib-version.jar files. These tag liberary cannot use in … Read more

Directory Structure of Struts1 Based Web Application

Following is the structure of struts1 web application Create Project Name. Under of Project folder create Web-INF folder. Under of Web-inf folder create web.xmlstruts-config.xml file,all tld files, validator-rules.xml file and validation.xml file. Under of classes folder put All paickages of action class and form beans class,also put Application.resources.property files. In lib foalder put all struts … Read more

Types of Form Beans in Struts1

The FormBean that is generated by struts forward software dynamically based on the details we provide in struts-config.xml file is called Dynamic Form Beans. There are six types of Form Beans Classes. 1 validationForm. 2 DynavalidatorForm. 3 ActionForm. 4 DynaActionForm. 5 ValidatorActionForm. 6 DynaValidatorActionForm.

Types of Built actions in Struts1

There are following built in actions in Struts1 1 Action Class. 2 Dispatch Action Class. 3 Lookup Dispatch Action. 4 Forward Action Class. 5 Include Action Class. 6 Switch Action Class. 7 Locale Action Class.

Struts1 Validation

Process of verifing the format & correctness of the html/jsp form data like required field are typed or not. There are two types of validation in any application. client side validation.(using javascript .js) server side validation.(using server side technology like servlet,jsp) Struts based server side validation using programmatic approach using validate(—-) of formBean class. using … Read more

Struts1 Spring and Hibernate Integration

Register.jsp

Failure.jsp

Success.jsp

web.xml

struts-config.xml

applicationContext.xml

RegisterForm.java

RegisterAction.java

Register.hbm.xml

Register.java

RegisterDao.java

RegisterDao.Impl.java

RegisterBoImpl.java

RegisterBo.java

Struts1 and Spring Configuration Steps

While integrating struts with spring provides business logic in the form of beans and the MVC layer will be provided by struts. In the order to integrate struts of spring we need plugin class called contextLoaderPlugin or contextLoaderLisenar class these are given in org.spfw.web.struts.jar.*. We need to configure the above plugin in struts-config.xml file with … Read more

DynaAction Form

Struts 1.2 mandated that every HTML form in the JSPs have an associated ActionForm. Struts 1.1 changed all that with the introduction of DynaActionForm – dynamic ActionForm as the name suggests. DynaActionForm is defined in the struts-config.xml as a form-bean. A sample DynaActionForm is shown below Sample DynaActionForm

There are two things For a … Read more

Declarative validation example

When ever we deploy this program in any server this program we used Declarative validation logic those validation declare in validation.xml files under of tags. We declare form bean names, fields property depends with the help of ApplicationResources.properties file this generate any errors messages again with the help of tags in jsp pages it display … Read more

DynaAction form example

register.jsp

Failure.jsp

Fail.html

web.xml

struts-config.xml

validation.xml

Register.java

ApplicationResources.properties