Chapter 7 Developing Applications with PowerJ and EAServer


Building Java servlets

A servlet is a server component that interacts with web clients to provide dynamic web content. PowerJ 3.6 supports Version 2.2 of the J2EE Java Servlet specification.

In PowerJ, you can create a servlet using the Servlet 2.2 wizard on the Target tab of the New dialog box. The wizard creates a servlet with some basic content, including method signatures for four methods: init, destroy, doGet, and doPost.

When you build the servlet, PowerJ compiles it, checks for compile-time syntax errors, and provides information for runtime debugging. The build process creates the servlet class and an XML file with the same name as the servlet.

Servlet files are deployed in a Web Archive (WAR) collection. PowerJ wizards enable you to collect servlets and related files into a WAR target. Building the WAR target merges the XML files for each target in the archive into a single XML file called web.xml.

 


Copyright © 2000 Sybase, Inc. All rights reserved.