From Twitter

RELATION OF APPLETS AND SERVLETS WITH JSP

RELATION OF APPLETS AND SERVLETS WITH JSP

Now, in this topic we shall compare applets, servlets and JSP and shall try to make a
relationship among these.
 

Let us start with the Applets. These are small programs that are downloaded into a
Java Enabled Web Browser, like, Netscape Navigator or Microsoft Internet Explorer.
The browser will execute the applet on the client’s machine. The downloaded applet
has very limited access to the client machine’s file system and network capabilities.
These limitations ensure that the applet can’t perform any malicious activity on the
client’s machine, such as deleting files or installing viruses. By default, a downloaded
applet cannot read or write files from the file system, and may use the network only to
communicate back to the server of origin. Using security certificates, applets can be
given permission to do anything on the user’s machine that a normal Java application
can do. This may be impractical for Extranet applications; however, as users may
require support to give these permissions or may not trust an organization enough to
grant such permission.
 
Applets greatly enhance the user interface available through a browser. Applets can
be created to act exactly like any other client-server GUI application including menus,
popup dialog windows, and many other user-friendly features not otherwise available
in a web browser environment.

But main problem with applet is it’s long setup time over modems. Applets need to be Java Server Pages-1
downloaded over the Internet. Instead of just downloading the information to be
displayed, a browser must download the whole application to execute it. The more
functionality the applet provides, the longer it will take to download. Therefore,
applets are best suited for applications that either run on an Intranet, or are small
enough to download quickly and don't require special security access.
 
Next, Servlet is a Java program that runs in conjunction with a Web Server. A servlet
is executed in response to an HTTP request from a client browser. The servlet
executes and then returns an HTML page back to the browser.
Some major advantages of servlets are:
 
• Servlets handle multiple requests. Once a servlet is started it remains in memory
and can handle multiple HTTP requests. In contrast, other server side script e.g.
CGI program ends after each request and must be restarted for each subsequent
request, reducing performance.
 
• Servlets support server side execution. Servlets do not run on the client, all
execution takes place on the server. While, they provide the advantages of
generating dynamic content, they do not levy the same download time
requirement as applets.
 
Major problem with servlets is their limited functionality. Since they deliver HTML
pages to their clients, the user interface available through a servlet is limited by what
the HTML specification supports.

Next, as you know, a JSP is text document that describes how a server should handle
specific requests. A JSP is run by a JSP Server, which interprets the JSP and performs
the actions the page describes. Frequently, the JSP server compiles the JSP into a
servlet to enhance performance. The server would then periodically check the JSP for
changes and if there is any change in JSP, the server will recompile it into a servlet.
JSPs have the same advantages and disadvantages as servlets when compared to
applets.
 
• JSP is Easier to Develop and Maintain than Servlets
To the developer, JSPs look very similar to static HTML pages, except that they
contain special tags used to identify and define areas that contain Java functionality.
Because of the close relationship between JSPs and the resulting HTML page, JSPs
are easier to develop than a servlet that performs similar operations. Because they do
not need to be compiled, JSPs are easier to maintain and enhance than servlets.
 
• JSP’s Initial Access Slower than Servlets
However, because they need to be interpreted or compiled by the server, response
time for initial accesses may be slower than servlets.



1 comment:

Labels

(MCS-031 (6) 2011 (5) 4nf (1) 5nf (1) ACCESS CONTROL In Relational Database (1) ALGORITHMICS (5) assignment 2014 2015 (1) AVAILABLE TOOLS & ALGORITHMS (5) BCA (1) BINARY SEARCH (1) Block Nested Loop Join (1) Build and Fix Model (1) BUILDING BLOCKS OF ALGORITHMS (1) CHARACTERISTICS OF AN ALGORITHM (2) Core Java (1) Data Communication Network Security (1) DATABASE SECURITY (1) EER tool (1) ELEMEMTARY ALGORITHMICS (2) ENHANCED ER TOOLS (1) EVOLUTION (1) EXAMPLE OF AN ALGORITHM (2) Indexed Nested-Loop Join (1) install servelet engine (1) INTRODUCTION (1) Iterative Enhancement Model (1) Java Server Pages (1) JDBC (1) JSP (2) LEVELS OF DATABASE SECURITY (1) MCA (9) MCA 051 (1) MCA 3rd Semester (8) MCA 4th Semester (1) MCA 5 sem (1) MCS-031 (7) MCS-031 : DESIGN AND ANALYSIS OF ALGORITHM (14) MCS-032 (1) MCS-033 (1) MCS-034 (2) MCS-035 (1) mcs-041 (2) MCS-042 (1) mcs-043 (2) mcs-052 solved assignment (1) MCSL-036 (2) Nested loop join (1) OBJECTIVES (1) Operating System (2) OUTLINE OF ALGORITHMICS (1) Principles of Management and Information Systems (1) PROBLEMS (1) QUERY PROCESSING AND EVALUATION (1) Query processing Optimisation (1) Question Papers (8) Related Topic (9) relational Database (1) SELECT OPERATION Query Processing (1) Servlet (1) Servlet Programme (1) Servlet Programming (1) SOFTWARE DEVELOPMENT MODELS (4) SOFTWARE ENGINEERING (4) Solution (7) Solved Assignment 2013 2014 (6) SOME PRE-REQUISITES AND Asymptotic Bounds ASYMPTOTIC BOUNDS INTRODUCTION (1) STATISTICAL DATABASE SECURITY (1) structure (1) SUMMARY (1) Waterfall Model (1) Write a C program to print the following triangle (1)