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 have written for other application servers can be used inserted in JSPs with DSP tag library tags. However, those servlets will not have access to all of the other facilities available to Nucleus components. If you are writing ATG Servlet Beans from scratch, the DynamoServlet class will provide an easier starting point.

 
loading table of contents...