The ServletExample2 Class Declaration

The ServletExample2 servlet receives an XML document and uses the Saxon transformation API to transform the XML document into an HTML table. It uses an EJB component to access the database and encode the data as an XML document. The first code block, shown here, simply declares the class and various instance members needed to perform its work.

The ServletExample2 Class: Class Declaration
 package ServletExamples; import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.net.*; import java.io.*; // j2ee import javax.ejb.*; import javax.naming.*; import java.rmi.*; import javax.rmi.*; import java.io.Serializable; // our packages ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.