0% found this document useful (0 votes)
0 views

Applying JSP and Servlets in Introducing Secure Web-Based

The document discusses the application of Java Server Pages (JSP) and Servlets in creating a secure web-based database for an online admission system. It covers the importance of dynamic web scripting languages, server-side and client-side techniques, and the architecture of JSP and Servlets. Additionally, it highlights the performance of JSP pages on a Tomcat server and the prototyping process for the admission system.

Uploaded by

emlaias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Applying JSP and Servlets in Introducing Secure Web-Based

The document discusses the application of Java Server Pages (JSP) and Servlets in creating a secure web-based database for an online admission system. It covers the importance of dynamic web scripting languages, server-side and client-side techniques, and the architecture of JSP and Servlets. Additionally, it highlights the performance of JSP pages on a Tomcat server and the prototyping process for the admission system.

Uploaded by

emlaias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

International Journal for Multidisciplinary Research (IJFMR)

E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

Applying JSP and Servlets in Introducing


Secure Web-Based Database for Online
Admission System
Dr. Elmabruk M Laias1, Mohammed Alnaas2
1
Department of Computer, University of Benghazi/Qumenis Branch
2
Computer Science Department Libyan Acade, Libyan Academy for Postgraduate Studies

Abstract:
At the present time websites produce dynamic responses to the user requests. So there is a need for
dynamic web Scripting languages. A web page is a server-side dynamic page whose structure is controlled
by server-side scripts. The Scripting Language refers to dynamic high level general purpose language.
Three most popular web scripting languages are: PHP, JSP and ASP.NET languages in the world. The
major requirements for enterprise applications are Performance, Scalability, manageability, code
portability, mode of source, Cloud Feasibility, database, security are rapidly increasing. Now the issue in
this competitive environment is choosing the best scripting language .the paper basically depicts the use
of java server pages as well as servlets in building a web application.variety of topics will be covered in
this paper including: Introduction to jsp and servlets , Life cycle and architecture of servlet and jsp
,Difference between jsp and servlets

KEYWORDS: Generation, Web Content, platform, External Hosting, CGI and Web Application

1. Introduction
The World Wide Web is from the Client-Server application. Web browsers make requests of Web servers
to return a file that is displayed on the browser. In this way the Web server acts as a file server for the
browser client.
Web application allows programs to be widely available without the need to physically transfer the
program’s file, and allows programs to be accessed remotely without dedicated connections. This area is
currently one of the fastest growing aspects of information technology. The web applications are moving
very fast toward the world of trading and business.
Like many areas of new technology there are many methods and products available to produce this form
of information processing. However all can be divided into types:
1. Server Side Techniques
This part of the web technology is dedicated to the server side and runs on it.
2. Client Side Techniques
The client side technology is for the client side and it runs on it.

1.1 Server-Side Techniques


Server-side technology is the first way of providing applications over the web.

IJFMR23068654 Volume 5, Issue 6, November-December 2023 1


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

In this approach the browser requests the program from the web-server that then call the program itself
(either from its own memory or from a remote server) and then returns the result to the browser. This is
the traditional client-server relationship, the client makes the request and all the processing is done by the
server.
This approach has many advantages, mainly because it is simple and well understood. Firstly there are no
compatibility problems; the application is always run on the same machine and does not rely on specific
browser parameters or other software running on the client's machine. This is important as there are many
types of browser available and there is little standardization beyond the most basic HTML concepts. Even
the two most widely used browsers, Netscape Navigator and Microsoft Explorer have many differences
and each comes in several different versions for different machine technologies which have subtle
differences between them [1].
Secondly running the application on the server often makes good sense because that is where the data
required for the program exists; for example one of the most common form of application is data-base
access and it is more practical for the application to run on the same machine as the data-base, thus
simplifying the whole process.
There is, however, a drawback to server-side applications. Since all processing occurs on the server it
could become over-loaded; if too many requests are made by different clients the server might find it
difficult or impossible to keep up with the processing required.
This is an important point because many clients may be browsing the same web-site at one time.

A. Active Server Pages (ASP)


Microsoft’s Active Server Pages (ASP) is an Internet framework that you can use to make your web pages
dynamic. The most popular use of ASP is in conjunction with databases. ASP can be used to write
applications that access small databases like MS Access or large enterprise databases like SQL Server or
Oracle. The most popular and most widely used language to write ASP in is VBScript. VBScript is a
scaled down version of Visual Basic. Since ASP is written using a scripting language it is therefore
interpreted code. This means that you do not compile it before you run it. You write the code and then
when it is accessed through a web browser on a server, the server interprets the code and sends HTML
back to the browser to display. This makes ASP a browser independent solution. This is also the reason
that you do not see any ASP code when you do a view source on an ASP web page.
The way that you write an ASP page is to open a text editor, like notepad, write some ASP code in it, and
save it as an .asp file. All ASP code needs to be placed inside <% and%>. If you do not do this all the
code will get printed out as if it were text. At this point the file needs to be placed on a server that supports
ASP. After the file is uploaded or moved to a directory on a web server, you can then access it with a web
browser to see the result.
The way that ASP works is you call the object you want with a dot after it followed by the method you
want to invoke. Then you can pass in any parameters you want to the method.

B. Java Server Pages (JSP)


Sun Microsystems Java Server Pages (JSP) is another technology for developing dynamic web sites. JSP
technology enables rapid development of web-based applications that are platform independent. Java
Server Pages is first parsed into a java source file which is then compiled into a servlet class. This occurs
when the page is first requested.

IJFMR23068654 Volume 5, Issue 6, November-December 2023 2


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

Figure (1) JSP Architecture and Life Cycle [3]

A JSP page contains standard markup language elements, such as HTML tags. However a JSP page
contains special JSP elements that allow the server to insert dynamic content in the page. JSP elements
can be used for different purposes, such as manipulating data stored in a database.
JSP defines a number of standard elements useful for web application; such as accessing JavaBeans
components, passing control between pages, and sharing information between requests, pages and
users[2].
JSP lets the developer to develop web application by embedding specialized code into HTML pages. Java
is the default scripting language of JSP, but the JSP allows for other languages to be used, such as
JavaScript, Perl, and VBScript. The following is a simple JSP page:
<html>
<body>
<% java.util.Date clock = new java.utl.Date();%>
<% if (Clock.getHours() < 12 ){ %>
<h1> Good morning</h1>
<%else if (Clock.getHours() < 18) { %>
<h1> Good day</h1>
<% }else{%>
<h1> Good evening</h1>
<% } %>
</body>

</html>

C. JAVA SERVLETS
Java Servlets are a way of using Java for server side processing. It provides a component- based, platform-
independent method for building web-based applications.
Server side scripting and programming based on Java classes includes Java Servlet and Java Server Pages.
Why Java? Some Web servers, such as Sun's Java Web Server (JWS), W3C's Jigsaw and Gefion
Software's LiteWebServer (LWS) are implemented in Java and have a built-in servlet engine.
Other Web servers, such as Netscape's Enterprise Server, Microsoft's Internet Information Server (IIS)
and the Apache Group's Apache, require a servlet engine add-on module, but every most popular server

IJFMR23068654 Volume 5, Issue 6, November-December 2023 3


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

software includes a java server side scripting and programming.


The servlet engine loads the servlet class the first time the servlet is requested, or optionally already when
the servlet engine is started. The servlet then stays loaded to handle multiple requests until it is explicitly
unloaded or the servlet engine is shut down. This is fast and reliable.

1.2 Client-Side Techniques


The client-side Technique of providing web applications is the alternate to the server-side method. These
techniques are executed on the client side when the client browser calls a client-side application from a
web-page. The advantage of this method is that the communications between client and server can be
reduced. As more and more people use the World Wide Web this is becoming an increasingly important
point.
The client Side techniques introduce problems: There can be serious compatibility problems as many
different browsers on many different types of machine could try to execute an application. Some way has
to be found of allowing the same program to be run on at least all the more common combinations. There
is also a problem with resources; a large and complex application might not be able to run efficiently on a
client's machine, or it might not even be able to run at all. The client-side method is becoming rapidly
more popular as faster machines become more affordable to the general public as it provides a more
efficient method of providing an application for many concurrent users.
Client-side scripting is another area that is becoming popular due to its ease of learning for non-
programmers. Many applications do not need the facilities of a programming language and so client-side
scripting usually uses a language which is simple compared with programming languages.
In general scripting is done in small chunks to implement simple applications and all scripting languages
are interpreted rather than compiled.
Client-side scripting is done by including the required script in a HTML document with the correct HTML
tags.

2. Prototyping Web-based on-line remote admission system


After Feasibility study, the system implementation will be achieved by prototyping. The prototyping
process contains creating the most important parts of the required system, which should satisfy the main
functions as system objects. The final product of prototyping Web-based on-line remote admission system,
which could be seen as a combination of database design, WWW applications and local network
application.
Figure (2) is Use case diagram for the admission system of this Prototype, which expresses the contents
of aims, objects and sources and also includes the relationship within the elements.

IJFMR23068654 Volume 5, Issue 6, November-December 2023 4


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

Figure (2) Use case diagram for the admission system

To develop this web application. We need some tools and a work environment. The first is the Java2 SDK
(Java 2 Standard Edition). which can allow us to compile Java code. The second is a servlet container In
this project, Tomcat was used for Serviet development and deployment. The Apache Project's Tomcat is
the reference implementation of Java Servlet 2.2 and JSP 1.1 technologies. Tomcat is available Iree from
jakarta.apache.org. It is also an open source under the Apache Software Licence version 1.1.
On the other hand, a database could be seen as dynamic, it can be changed by its functions: create, insert
or delete data. The Web - database is an appropriate approach to combine both of HTML document and
databases it forms the capability to apply dynamic applications on the Www As that. "the Web could be
seen as a platform for providing users with an interface to one or more databases Data intensive business
applications consist of four components: the database, the transaction logic, the application logic and the
user interface [4].
In the past, enterprises would put all these components in the mainframe environment.
currently, the business environments are increasingly decentralisation, a enterprise can takes. operation in
different places the client - server system was developed for this trend. There are two types of client -
server system architecture:
The traditional two - tier architecture and three - tier architecture, shown in Figure (3).

IJFMR23068654 Volume 5, Issue 6, November-December 2023 5


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

Figure (3) The traditional Two Tier architecture and three Tier architecture

3. performance of loading JSP pages


This section provides the performance of loading a JSP page running on a Tomcat 7 server.
JSP page runs much faster. Execution time reduced from 8 seconds to 1 second for the "1000" test.

using other Tomcat vesion, the sample JSP runs slower than the last version! Execution times doubled for
both "10000" and "100000" tests. also Tomcat 9 server needs some performance tuning.

References:
1. Powell, Web Design: The complete reference, 2000, McGraw-Hill,USA
2. Hans Bergsten, JAVAServer Pages,2001, O’Reilly & Associates, USA Jason Whittaker, Producing
for the web,2000, Routledge, USA
3. http://www.javatpoint.com/life-cycleof-a-servlet
4. Barry Eaglestone, Relational Database, 1991, Stanley Thornes Ltd,UK

IJFMR23068654 Volume 5, Issue 6, November-December 2023 6


International Journal for Multidisciplinary Research (IJFMR)
E-ISSN: 2582-2160 ● Website: www.ijfmr.com ● Email: [email protected]

5. Arman Danesh, JavaScript Intractive course, 1997, Mitchell Waite, USA


6. Arman Danesh and Kristin Aileen Motlagh, Mastring ColdFusion, 1999, SYBEX Inc., USA
7. Barry Eaglestone and Mick Ridley, Web Databas Systems, 2001, McGraw-Hill International, uk
8. Eon Atkinson, Core PHP Programming using PHP to build Dynamic Web Sites, 2001, Prentice-
Hall,USA
9. Molly Hammar Cloyd, Broadbase Software “Designing User-Centered Web Applications in Web
Time”. IEEE Software Jan/Feb 2001,62-69
10. Yogesh Deshpande and Steve Hansen University of Western Sydney, Australia, ”Engineering:Creating
a Discipline among Disciplines”, IEEE Multimedia , April/June 2001, 82-87
11. Larry Ullman, PHP for the World Wide Web,2001, Addison Wesley Longman, USA Margaret Levine
Young, The complete Reference Internet Millenium edition,1999, McGraw-Hill, USA
12. Mark Swank and Drew Kittel,World wide web database developer’s guide,1996, San.net Publishing,
USA
13. Perdiate Stevens and Rob Pooley, Using UML software Engineering with Objects and components,
2000, Pearson Education Limited, UK.

IJFMR23068654 Volume 5, Issue 6, November-December 2023 7

You might also like