Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

Struts Tutorial
Struts Introduction
Struts Controller
Struts Action Class
Struts ActionForm Class
Struts HTML Tags
Struts Validator Framework
Struts ClientSide Address Valiadation
Struts Tiles
Using tiles-defs.xml
Dynamic Action Form
Struts File Upload
Struts Database Connection

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


Understanding The Struts Controller
Previous Next


Struts framework support MVC(Model View Controller) architecture 2




What is Model-View-Controller (MVC) Architecture?

The Model-View-Controller architecture Model helps to devide an application into three different categories i,e Model, View and the Controller. Components of the MVC architecture is independent of other component and has unique responsibility.Changes in one component will have less or no impact on other components.Responsibilities of the three components are:

Model:Model is used for providing the data from the database and saving the data into the data stores.In Model,all the business logic are implemented .Before saving into the database,data entered by the user through View are checked in the model.Data access,the Data saving logic and Data validation are part of the Model.

View: View is responsible for the taking the input from the user, dispatching the request to the controller and then receiving response from the controller,displaying the result to the user and represents the user view of the application. HTML, Custom Tag Libraries,JSPs and Resources files are part of the view component.

Controller: Controller is intermediary between the View and the Model.For receiving the request from the client,Controller is used. Once request is received from the client it executes the appropriate business logic from the Model and then it uses the View component to produce the output.ActionServlet,ActionForm, Action, and struts-config.xml are part of the Controller.




The above figure is the MVC architecture 2 model which uses by the Struts.




Setting Up Development Environment
Installing JDK:

From the sun site,download JDK 1.4 or above . Use the instruction given in installation manual and install JDK.




Installing Tomcat:

Go to the apache site and then download Tomcat and install it. I have downloaded jakarta-tomcat-5.0.4 and installed for this tutorial only. To  test your installation go to your installation directory/bin and to run server,issue startup command .To test the server,open the browser and type http://localhost:8080/ . The browser should display the welcome page. If not before going further,consult the tomcat documentation .




Installing Struts Application:

Go to the official site of Struts and then download latest version of the Struts http://jakarta.apache.org/struts. Extract the file into your own directory and copy struts-blank.war, struts-example.war and struts-documentation.war from the "jakarta-struts-1.1\webapps" directtory into "jakarta-tomcat-5.0.4\webapps" directory.

struts-blank.war is useful in creating the struts application from scratch and also the blank struts application .To create our web applications, we will use this file.

struts-documentation.war important documents for the struts application development and also contains the API and struts-example.war is the simple MailReader Demonstration Application




Developing First Struts Application

Go to the jakarta-tomcat-5.0.4\webapps and then rename struts-blank.war to struts-tutorial.war and copy it to the "jakarta-tomcat-5.0.4\webapps" directory. Tomcat loads the application and automatically extract the file.




Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords: struts controller,struts tiles controller,struts config controller,controller struts,struts web xml,controller in struts,struts control,jsp controller,struts tutorial,java struts,struts mvc,struts jakarta,struts examples


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.