Services | Updates | Contact
Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
Configuration, Resource Usage and StdSchedulerFactory
Quartz is architected in modularized way, that's why before running it, several components need to be snapped together.
 
ATL
ATL (ATLAS Transformation Language) is a model transformation language and toolkit developed by the ATLAS Group (INRIA &
 
More Tutorials...


    Loan Information     Struts     Open Source

Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

 
 
Struts

 
Comments
 
 

 

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 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.
  

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

140 comments so far (post your own) View All Comments Latest 10 Comments:

I think u need to put some more demos and assignments.
Like a miny project sort of thing.

Posted by Harsh Gautam on Thursday, 04.24.08 @ 13:58pm | #57786

great! simple understandable notes

Posted by gautham on Wednesday, 04.23.08 @ 12:45pm | #57683

very nice and easy notes for begginers.

Posted by Renu on Tuesday, 03.25.08 @ 15:27pm | #54262

very nice and easy notes for begginers.

Posted by Renu on Tuesday, 03.25.08 @ 15:26pm | #54261

this tutorial is very nice easy to understand

Posted by muthumariappapap on Sunday, 03.23.08 @ 00:45am | #53833

hi can any one suggest me a basic book for begining struts

Posted by venkat on Monday, 03.3.08 @ 18:24pm | #51161

Very Nice Tutorial

Thanks
Harish Dwivedi

Posted by Harish Dwivedi on Tuesday, 02.19.08 @ 11:50am | #48975

hi

i don't know struts please suggest any book to know the struts

Posted by lakshmi on Monday, 01.21.08 @ 11:20am | #45745

this is one of the best tutorial for struts learners..

Posted by karthik.g on Thursday, 01.10.08 @ 13:44pm | #44893

Very nice of you to make an install guide for struts

Posted by uncleboob on Friday, 12.21.07 @ 21:18pm | #43267

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

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

Copyright © 2007. All rights reserved.