Introduction to WebObjects J2EE Programming Guide

JavaServer Pages (JSP) and servlets are important parts of Sun’s J2EE (Java 2 Platform, Enterprise Edition) architecture. JSP is a specification that defines interfaces that servlet-container vendors can implement to provide developers the ability to create dynamic Web pages, which are files with the extension .jsp. Servlet containers interpret these files and create servlets (also know as workhorse servlets) to process HTTP requests and produce responses. Servlets are server plug-ins that extend the capabilities of your Web server. They provide a straightforward deployment mechanism for your applications. Servlets are deployed inside servlet containers, which are plug-ins to your Web server.

You should read this document if you want to deploy your WebObjects applications inside a servlet container or want to take advantage of WebObjects components (both standard and custom) in your JSP pages.

Deploying WebObjects applications as servlets allows you to take advantage of the features that your servlet container provides. Keep in mind that deployment tools such as Monitor and wotaskd do not work with servlets. WebObjects uses version 2.2 of the Servlet API, and version 1.1 of the JSP specification.

Organization of This Document

The document addresses two major points, each contained in its own chapter:

See Also

To get the most out of this document, you must be familiar with WebObjects application development. In particular, you need to know how to create applications using Project Builder and how to layout WebObjects components using WebObjects Builder.

For additional WebObjects documentation and links to other resources, visit http://developer.apple.com/webobjects.

In addition to WebObjects development experience, you also need to be acquainted with the syntax used in JSP pages and with the layout of WAR (Web Application Archive) files. You can find information about JSP and J2EE in the following documents:

WebObjects Developer also includes a commented application project that shows you how JSP pages can take advantage of WebObjects components and direct actions. The example—using the client/server approach—includes two WebObjects application projects named SchoolToolsClient and SchoolToolsServer. The projects are located at /Developer/Examples/JavaWebObjects.

The three servlet containers supported in WebObjects are listed in Table I-1.

Table I-1  Servlet containers supported in WebObjects

Platform

Container

Version

Mac OS X Server

Tomcat

3.2.4

Solaris

WebLogic

7.0

Windows 2000

WebSphere

4.0.4