Previous     Contents     Index     DocHome     Next     
iPlanet Web Server, Enterprise Edition Programmer's Guide to Servlets



Chapter 1   Servlets and JavaServer Pages


iPlanet Web Server 6.0 supports servlets and JavaServer Pages (JSPs). This chapter gives a brief overview of servlets and JSPs in iPlanet Web Server 6.0.

The sections in this chapter are:

iPlanet Web Server 6.0 runs with a specific version of the JRE or JDK that is operating-system dependent. For more information, see "What Does the Server Need to Run JSP?."



Web Applications



iPlanet Web Server 6.0 supports the Servlet 2.2 API specification, which allows servlets and JSPs to be included in web applications.

A web application is a collection of servlets, JavaServer Pages, HTML documents, and other web resources which might include image files, compressed archives, and other data. A web application may be packaged into an archive (a WAR file) or exist in an open directory structure.

For more details about web application support in iPlanet Web Server, see Chapter 2 "Web Applications."

Although using web applications is recommended, you can still configure servlets and JSPs as in iPlanet Web Server 4.x. For more information, see Chapter 8 "Legacy Servlet and JSP Configuration."



Servlets



Java servlets are server-side Java programs that web servers can run to generate content in response to a client request in much the same way as CGI programs do. Servlets can be thought of as applets that run on the server side without a user interface. Servlets are invoked through URL invocation.

iPlanet Web Server 6.0 supports the Java Servlet Specification version 2.2 (including Web Application and WAR file support).



Note Servlet API version 2.2 is fully backward compatible with version 2.1, so all existing servlets will continue to work without modification or recompilation.



To develop servlets, use Sun Microsystems' Java Servlet API. For information about using the Java Servlet API, see the documentation provided by Sun Microsystems at:

http://java.sun.com/products/servlet/index.html



JavaServer Pages



iPlanet Web Server 6.0 supports JavaServer Pages (JSP) Specification version 1.1.

A JSP is a page, much like an HTML page, that can be viewed in a web browser. However, in addition to HTML tags, it can include a set of JSP tags and directives intermixed with Java code that extend the ability of the web page designer to incorporate dynamic content in a page. These additional features provide functionality such as displaying property values and using simple conditionals.

One of the main benefits of JSPs is that, like HTML pages, they do not need to be compiled. The web page designer simply writes a page that uses HTML and JSP tags and puts it on their web server. The web page designer does not need to learn how to define Java classes or use Java compilers.

iPlanet Web Server supports precompilation of JSPs, however, and this is recommended for production servers.

JSP pages can access full Java functionality in the following ways:

  • by embedding Java code directly in scriptlets in the page

  • by accessing Java beans

  • by using server-side tags that include Java servlets

Both beans and servlets are Java classes that need to be compiled, but they can be defined and compiled by a Java programmer, who then publishes the interface to the bean or the servlet. The web page designer can access a pre-compiled bean or servlet from a JSP page.

iPlanet Web Server 6.0 supports JSP tag libraries and standard portable tags.

For information about creating JSPs, see Sun Microsystem's JavaServer Pages web site at:

http://java.sun.com/products/jsp/index.html

For information about Java Beans, see Sun Microsystem's JavaBeans web page at:

http://java.sun.com/beans/index.html


Previous     Contents     Index     DocHome     Next     
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.

Last Updated May 02, 2001