Using Java Servlets
39
Servlet benefits
Servlets offer many benefits to web developers over existing server-side application
development technologies. Some of these benefits are associated with the Java
programming language and others are associated with servlet technology. This section
discusses several benefits of using servlets and Java.
Benefits of using servlets
Servlet technology offers the following benefits to web developers:
•
Security
Because servlets are invoked through the web server, your business logic
cannot be directly exposed to the client. In addition, servlets are isolated from each
other so that an error in one servlet cannot corrupt any other servlet.
•
Performance
One of the biggest differences between existing server-side
applications, such as CGI, and servlets is performance. A servlet is loaded once when
it is called. The servlet remains in memory and is not reloaded until it changes. A
modified servlet can be reloaded without restarting the web server or application.
In addition, servlets are multithreaded and run within the process of the servlet
server. A process context switch is not required to handle each servlet request.
•
Portability
Using JRun, servlets adhere to the industry-standard servlet
specification and are portable to any other web server that supports the servlet
standard or uses JRun. Portability is important for servlet vendors because they do
not have to maintain a different version of the servlet for different web servers and
server platforms.
•
Stability
Servlets execute outside the process of the web server. Therefore, if a
servlet produces an error, only the process executing the servlet is affected; the web
server process is isolated and is not affected.
•
State persistence
Multiple invocations of the servlet can share static or persistent
information. This lets you share information between multiple users or within a
session.
Benefits of using Java
Some of the most important benefits of servlets are a result of their being implemented in
the Java programming language. Because servlets take advantage of the inherent
portability of Java, they can run on all web servers and server platforms supported by
JRun.
Java offers a number of benefits for application programmers, including the following:
•
Application portability
•
Object-oriented programming
•
Simplified programming model
•
Multithreading support
•
Automatic garbage collecting
Because you develop your servlets using Java or JavaServer Pages, you receive the
additional benefits of the Java programming language.
Summary of Contents for 38000382 - Macromedia JRun - Mac
Page 1: ...Getting Started with JRun...
Page 16: ......
Page 68: ...54 Chapter 5 Introduction to EJB...
Page 82: ......
Page 110: ...96 Lesson 3 EJB Tutorial...
Page 128: ...114 Lesson 4 Web Services Tutorial...
Page 132: ...118 Index...