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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.