beautypg.com

Jsp and servlets, Jndi – Apple WebObjects 5 User Manual

Page 89

background image

C H A P T E R 7

J2EE Integration

JSP and Servlets

89

Apple Computer, Inc. January 2002

JSP and Servlets

Servlets are generic server extensions that expand the functionality of a server. By
deploying WebObjects applications as servlets running inside servlet containers,
you can take advantage of the features that your servlet container offers.
Alternatively, you can deploy your applications using an HTTP adaptor that talks
to your HTTP server.

Deploying applications as servlets can be more efficient that using HTTP adaptors.
A servlet is loaded once inside a servlet container. Concurrent requests are handled
by separate threads, providing you with a high degree of scalability.

JSP is a technology that allows you to write dynamic Web pages that use JavaBeans
or WebObjects components. JSPs are compiled into servlets when users access
them. The servlets then process the request and typically return a Web page to the
user’s browser.

For more information on JSP and servlets, see JavaServer Pages and Servlet Integration.

JNDI

WebObjects implements the Java Naming and Directory Interface (JNDI) API.
Through it WebObjects applications can access multiple naming and directory
services, including Lightweight Directory Access Protocol (LDAP), Netware
Directory Services (NDS), Domain Name System (DNS), and Network Information
Service (NIS).

JNDI is used in EJB applications to locate beans, datasources, and other resources.