The sole goal of E-Governance is to allow interaction of government with their citizens in a comfortable & transparent manner. Uniqueness of J2EE makes it a perfect technology for development of any online portal. These involve constancy, easy to replant, construct speedily etc. In this paper we present a procedural approach to develop a web application using the J2EE Struts Framework.
World of Computer Science and Information Technology Journal (WCSIT)
ISSN: 2221-0741
Vol. 1, No. 1, 1-4, Feb. 2011
1
A Framework Based Approach for the Development
of Web Based Applications
Rachit Mohan Garg, YaminiSood, Balaji Kottana, Pallavi Totlani
Department of Computer Science & Engineering,
Jaypee University of Information Technology, Waknaghat, Solan, H.P, India
{rachit.mohan.garg, eryaminisood, bala1205, pallavi.totlani}@gmail.com
Abstract— The sole goal of E-Governance is to allow interaction of government with their citizens in a comfortable & transparent
manner. Uniqueness of J2EE makes it a perfect technology for development of any online portal. These involve constancy, easy to
replant, construct speedily etc. In this paper we present a procedural approach to develop a web application using the J2EE Struts
Framework.
Keywords- Web application; E-Governance; Struts; Frameworks; J2EE.
I.
INTRODUCTION
J2EE is the current field of research as it provides new
advancement to the field of web application development
framework. Various open source framework which are used for
web application development. With the development of
technology and communication technology, government wants
to modernize their working. E-Governance portal can be used
to provide services and important information to citizens
through internet, it changes the way of working of government
which are operated from traditional approaches to an advanced
and more efficient operations. The major advantages of
adapting E-Governance / E-Business portal to any government
are: removal of location and availability restrictions, reduction
of time and money spent, heightening customer services and
the provision of competitive advantages [1]-[2]. E-Governance
offers a new way forward, helping improve government
processes, connect citizens and build interactions with a civil
society.
Currently, number of technologies has been developed for
constructing E-portal, like ASP.NET and J2EE (Java 2
Enterprise Edition). J2EE is independent of a platform, that’s
why more and more e-portal adopts this technology. There are
many Open Source Frameworks which are based on J2EE
technology such as Struts [3], webwork, jsf, echo, Spring [4],
real methods, keel, Hibernate [5] and so on. Each framework
has its own characteristics, therefore this paper present one web
application which is made by Struts Framework [3].
II.
STRUTS FRAMEWORK FOR WEB APPLICATIONS
This paper has taken an example of E-Governance [1]
named “Records Collection for India” portal based on above
framework. Records Collection for India (RCI) maintains and
groups together information from various public services
departments that come under the preview of collector’s office
namely, schools, hospitals etc. Conventionally, the citizen has
to go to collector’s office in person to get issued certificates
like for community, birth, income and driving license etc. This
results in wastage of time. Here we provide the online
registration facility to apply for various documentation
certificates for the citizens so that the public in general has to
visit the collector’s office only once at the time of submitting
relevant documentary proofs or where physical presence is
mandatory.
This E-Governance portal has various functionalities. In
this section we discuss only login approach which is used by
Struts Framework. For this approach, following we require
some files namely
Login,jsp
Success.jsp
Faliure.jsp
Web.xml
Struts-config.xml
LoginAction.java
LoginForm.java
ApplicationResource.properties
A. Web.xml
For any web application we need to define web.xml file.
This file describe first page of that application. This
configuration should be done in this as shown fig 1.
WCSIT 1 (1), 1-4, Feb. 2011
2
Fig. 1 web.xml file.
B. Login.jsp
This page provide user interface for login page. In this
page Struts HTML Tags are used for developing user
interface. In our application, the login page has one text field
to retrieve user name and one password field to get password.
And form also contain one submit button, login action class is
called when this submit button is clicked. <html: errors /> tag
is used to display the error message to user. The login file of
our application is shown in fig 2.
Fig. 2 Login.jsp
C. Struts-config.xml
After submitting the form of Login.jsp page, validate
method of LoginForm class is called. If there is any error, like
username is missing or password is missing, then control is
returned back to the input page where errors are displayed to
the user.
This complete operation is configured in the action tag of
struts-config file. In this web application, “/Login” is action,
the input page is “login.jsp” and the corresponding action class
is LoginAction.java. The validate method is described in the
LoginForm.java file.
D. LoginForm.java
This java file contains v
This content is AI-processed based on open access ArXiv data.