Spring configuration first example

Resource of spring core module Applications are used 1 Spring interface. 2 Spring bean class. 3 Spring- configuration file. 4 Client Applications All the spring releted jar files put in lib folder directory structure is same as normal java/j2ee applications. Demo.xml

This example is setter base dependency injection this xml file is spring configuration … Read more

Inversion of Control/Dependency Injection

The basic principle is that beans define their dependencies (i.e. the other objects they work with) only through constructor arguments, arguments to a factory method, or properties which are set on the object instance after it has been constructed or returned from a factory method Dependency Injection are of two types 1 Constructor based dependency … Read more

BeanFactory and Bean Definitions

The BeanFactory and ApplicationContext is the actual container which instantiates, configures, and manages a number of beans. A BeanFactory comes by the interface org.springframework.beans.factory.BeanFactory, for which there are multiple implementations ApplicationContext comes in spring j2ee modules i.e spring 2.5 Activating spring beanFactory container is not but creating object for class that implements “org.springframework.beans.factory.BeanFactory” interface. ApplicationContexts … 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









Work Flow of Struts1 framework

User submits the request having data from login.jsp form. Through the web.xml ActionServlet traps the request. ActionServlet uses struts-config.xml file entries to decide appropriate action class and FormBean class to process the request. Forward Software create form beans class object and populates received form data to form bean class object. Forward create Action class object. … Read more

Steps to Develop a Program

Following are the steps to develop a struts1 bases programs Gather and define the application requirement. Define and developed each screen requirement in terms of the data collected and displayed. Determine all the access path for each screen. Determine the ActionMapping that correlate to the application business logic. Create the ActionForms with depend properties from … Read more

Struts1 first program Login Example








Introduction of struts1

Struts is a framework software to develop mvc base web application having the capability to generate integration logic of controller servlet dynamically.This make programmers only concentrate on view layer-presentation logic and Model layer Business logic. Vendors :Apache foundation Version:struts 1.2.x Based on servlet api-2.4,jsp api2.0 Author:crag Mcchallan Installing: installing struts s/w is nothing but downloading … Read more