The following is a simple example of using an Oracle ATG Web Commerce servlet bean to produce JSP code within a page.

Create the following Oracle ATG Web Commerce servlet bean in a file named and save it to <ATG10dir>/home/locallib:

import javax.servlet.*;
import javax.servlet.http.*;
import atg.servlet.*;

public class DSBTest extends DynamoServlet {
  public DSBTest () {}
  public void service (DynamoHttpServletRequest request,
                       DynamoHttpServletResponse response)
       throws ServletException, IOException
    ServletOutputStream out = response.getOutputStream ();
    out.println ("<h1>I am generated by a java object.</h1>");

Define <ATG10dir>/DAS/lib/classes.jar in your CLASSPATH, and compile DSBTest.class. Create an instance of it as a Nucleus component:

Now you can access the component from a JSP. In the J2EE Pages task area, create a JavaServer Page named dsbtest.jsp in a running application. For example, if you are running the ATG Adaptive Scenario Engine, save this file in the QuincyFunds application.

Add this text to dsbtest.jsp:

<%@ taglib uri="/dspTaglib" prefix="dsp" %>


<h1>DSB Test </h1>

<p>From a java object:

<p>Did it work?



Now embed the DSBTest servlet bean:

Notice how this example uses the dsp:droplet tag. When you embed an ATG servlet bean, you use a name attribute that specifies the name of the Nucleus component to embed. Nucleus finds the component, makes sure that it implements Servlet, then hands the request to the component to satisfy the dsp:droplet tag.

To make the /test/DSBTest component visible in the Dynamic Element Editor, you can use the dsp:importbean tag to import the component into the scope of your page.