In the previous example, the DSBTest servlet was a subclass of DynamoServlet. Its service method took DynamoHttpServletRequest and DynamoHttpServletResponse objects as parameters.

These interfaces are subclasses of standard servlet interfaces. DynamoHttpServletRequest extends HttpServletRequest and adds several functions that are used to access ATG servlet bean functionality. The DynamoHttpServletResponse extends HttpServletResponse and also adds a couple of useful functions.

The DynamoServlet class implements the javax.servlet.Servlet interface. It passes requests to the service method by passing a DynamoHttpServletRequest and DynamoHttpServletResponse as parameters.

The DynamoServlet class extends atg.nucleus.GenericService, which allows an ATG servlet bean to act as a Nucleus component. This means that the ATG servlet bean has access to logging interfaces, can be viewed in the Component Browser, and has all the other advantages of a Nucleus service.

A servlet invoked with the DSP tag library <dsp:droplet name=...> tag need not be a subclass of DynamoServlet; it only needs to implement the javax.servlet.Servlet interface. Any servlets that you write for other application servers can be used inserted in JSPs with DSP tag library tags. However, those servlets lack access to all other facilities available to Nucleus components. If you write ATG servlet beans from scratch, the DynamoServlet class provides an easier starting point.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices