Department of Computer Engineering Subject: Web Technology Laboratory
Expected Date of Completion…………………………………
Actual Date of Completion……………………….
Assignment No: 8
Title: Design and Develop any web application using struts framework.
Objective:
1. To implement the efficient client side and server-side technologies.
2. To implement the communication between computing nodes client side and server-side
technologies.
3. To design and implement the web service with content management.
Problem Statement
Design a login page with entries for name, mobile number email id and login button. Use struts
and perform following validations
a. Validation for correct names
b. Validation for mobile numbers
c. Validation for email id
d. Validation if no entered any value
e. Re-display for wrongly entered values with message
f. Congratulations and welcome page upon successful entries
Add dynamic web application essence using PHP, HTML and MySQL
Outcomes
1. Implement the effective client side and server-side technology using struts framework.
2. Solve the complex problem of development using MVC framework.
Software and Hardware requirement
Software:
1. Java 1.7 or above version, Apache Tomcat 7, Struts API’s, Eclipse IDE.
Theory
The frameworks play a vital role in industries for manageable and well-designed application
development as well as enterprise application. The core of Struts frameworks is a flexible control
layer based on standard technologies like Java servlets, JavaBeans, Resource Bundles, XML as
well as Jakarta Common Packages. Struts encourage application architecture based on the Model
2 approach, a variation of classic Model View Controller (MVC).
Struts gives its own particular controller segments and incorporate with different advancements
to give the model and view. For the Model Struts can collaborate with standards get to advances
as JDBC and EJB and also and most any outsider bundles, as Hibernate, iBATIS, or object
relational bridge.
Model View Controller (MVC) Architecture:
The Model-View-Controller (MVC) is an architectural pattern that separates an application into
three main logical components: the model, the view, and the controller. Each of these
components are built to handle specific development aspects of an application. MVC is one of
the most frequently used industry-standard web development framework to create scalable and
extensible projects.
Figure: MVC Architecture
What is Struts?
Struts is framework that advances the utilization of the Model-View-Controller (MVC)
engineering for planning substantiable application. The most intense part of the struts system is
its help for making and preparing electronic structure.
Struts Tags:
Common Attributes
Almost all the tags provided by Struts use the following attributes.
Attributes Used For
Id Name of a Bean for Temporary use by tags
Name Name of a pre-existing Bean for use with the tag
Property The property of the bean named in the names attribute for use with the tag
Scope The scope to search for the bean named in the name attribute
Tools and Techniques
1. Eclipse IDE
2. Apache Tomcat
Design and Execution Steps
Step 1: Create the Directory structure as
Step 2: Create input page as below.
Step 3: Provide entry of controller in ([Link]) file as given below.
Step 4: Create the action, Class ([Link]).
Step 5: Map the request in (struts [Link]) file and define the view components.
Step 6: Load the jar files.
Step 7: Start server and deploy the project or create .war file paste it in webapps folder and run
from manager-app.
Test Cases
1. Manual Test cases need to be performed on Struts framework.
2. Check whether the tomcat server is running.
3. Check Whether the application running status in manager app list is true.
4. Run the application by selecting the app in the list.
5. Check whether the application giving desired results.
Conclusion
Hence, we have successfully tested the Struts framework and Tested The results.