Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Struts Guide

Struts Guide Struts Guide This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web

Tutorial Details:

application development with JSP, Servlets, JDBC and custom tags. To begin with let's understand the Jakarta Struts Framework.
What is Struts?
Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open source. Struts Framework is suited for the application of any size. Latest version of struts can be downloaded from http://jakarta.apache.org/ . We are using jakarta-struts-1.1 and jakarta-tomcat-5.0.4 for this tutorial.
What is Model-View-Controller (MVC) Architecture?
Model-View-Controller architecture is all about dividing application components into three different categories Model, View and the Controller. Components of the MVC architecture has unique responsibility and each component is independent of the other component. Changes in one component will have no or less impact on other component. Responsibilities of the components are:
Model: Model is responsible for providing the data from the database and saving the data into the data store. All the business logic are implemented in the Model. Data entered by the user through View are check in the model before saving into the database. Data access, Data validation and the data saving logic are part of Model.
View: View represents the user view of the application and is responsible for taking the input from the user, dispatching the request to the controller and then receiving response from the controller and displaying the result to the user. HTML, JSPs, Custom Tag Libraries and Resources files are the part of view component.
Controller: Controller is intermediary between Model and View. Controller is responsible for receiving the request from client. Once request is received from client it executes the appropriate business logic from the Model and then produce the output to the user using the View component. ActionServlet, Action, ActionForm and struts-config.xml are the part of Controller.
Setting Up Development Environment
Installing JDK:
Download JDK 1.4 or above from sun site . Follow the instruction given in the installation manual and install JDK.
Installing Tomcat:
Download Tomcat from the apache site and install it. I have downloaded jakarta-tomcat-5.0.4 and installed for this tutorial. To test your installation go to your installation directory/bin and issue startup command to run the server. Open browser and type http://localhost:8080/ to test the server. It should display the welcome page. If not consult tomcat documentation before going further.
Installing Struts Application:
Download latest version of Struts from the official site of Struts http://jakarta.apache.org/struts . Extract the file ito your favorite directory and copy struts-blank.war , struts-documentation.war and struts-example.war from " jakarta-struts-1.1\webapps " directtory into " jakarta-tomcat-5.0.4\webapps " directory.
struts-blank.war is the blank struts application which is useful in creating struts application from scratch. We will use this file to create our web application.
struts-documentation.war contains API and important documents for the struts application development.
struts-example.war is simple MailReader Demonstration Application.
Developing First Struts Application
Rename struts-blank.war to struts-tutorial.war from jakarta-tomcat-5.0.4\webapps and copy it to the " jakarta-tomcat-5.0.4\webapps " directory. Tomcat automatically extracts the file and loads the application.
Note: I have decided to use JBoss 3.2.3 for next parts as it is very easy to deploy the application in JBoss and I have developed the Ant script for easy deployment of the tutorial. The hot deployment feature of JBoss is very useful and it pickups the new ear files and deploys automatically.
You can download JBoss 3.2.3 from jboss.org. For installing and how to use JBoss please have a look at http://www.roseindia.net/jboss/index.shtml .


 

Rate Tutorial:
http://www.roseindia.net/struts/strutsguide.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Struts Guide

View Tutorial:
Struts Guide

Related Tutorials:

JavaWorld Developer Tools Guide: IDE
JavaWorld Developer Tools Guide: IDE
 
JavaWorld Developer Tools Guide: Testing Tools
JavaWorld Developer Tools Guide: Testing Tools
 
JavaWorld Developer Tools Guide: Compiler, Code Management
JavaWorld Developer Tools Guide: Compiler, Code Management
 
JavaWorld Developer Tools Guide
JavaWorld Developer Tools Guide
 
JavaWorld Developer Tools Guide: Virtual Machine
JavaWorld Developer Tools Guide: Virtual Machine
 
Mix protocols transparently in Struts
Mix protocols transparently in Struts
 
Excellent tutorial on Struts and Tiles
Excellent tutorial on Struts and Tiles This tutorial assumes knowledge of Java, JDBC, Servlets, J2EE (with regards to Web applications) and JSP Struts in a holistic manner, minus the beads and crystals. The Tiles framework makes creating reusable pages
 
Struts best practices
Multiple options are available for solving problems with Struts. When deciding among these alternatives, the choice must be based on parameters such as the scale of work and availability of time.
 
Welcome to the Apache Struts Tutorial
This is the complete Struts Tutorial. Explains ActionForm Action Class Validation Framework.
 
Integrating Struts, Tiles, and JavaServer Faces
Integrating Struts, Tiles, and JavaServer Faces. Bring the power, flexibility, and manageability of the three technologies together.
 
Struts and Tiles aid component-based development
In the Java world, Struts is one of the best-known and most talked about open source embodiments of MVC.
 
Domain Registration Guide
Domain Registration Guide Domain Name Registrations Domain Name Registration Guide This guide is a must for any one wants to register domains.
 
Collection of Large Number of Java Interview Questions!
Collection of Large Number of Java Interview Questions! Collection of Large Number of Java Interview Questions The Core Java Interview Questions The Jakarta Struts Interview Questions
 
Jakarta Struts Interview Questions
Jakarta Struts Interview Questions Jakarta Struts Interview Questions Q: What is Jakarta Struts Framework? A: Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications.
 
The Beginners Linux Guide
The Beginners Linux Guide The Beginner's Guide to Linux Dedicated website to Linux containing Online Resource, Links to Linux Resources and Tutorials. Here you will find a lot of tutorials and information about the Linux. What is Linux? This
 
Beginner to advance guide to the Apache Struts
Beginner to advance guide to the Apache Struts The Complete Apache Struts Tutorial This complete reference of Jakarta Struts shows you how to develop Struts applications using ant and deploy on the JBoss Application Server. Ant script is provided
 
Struts Guide
Struts Guide Struts Guide This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web
 
Struts HTML Tags
Struts HTML Tags Struts HTML Tags Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces. To use the Struts
 
Understanding Struts Controller
Understanding Struts Controller Understanding Struts Controller In this section I will describe you the Controller part of the Struts Framework. I will show you how to configure the struts-config.xml file to map the request to some destination
 

Submission Home | Submit Web Sites | Why Manual Submission? | Web Promotion Guide
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.