Droplet ,ATG Servlet Bean And Custom Droplet

What is custom droplet:
A custom droplet s nothing but a new customized component i.e. a java class implementing business logic and a property file which registers it to nucleus.
It’s generally made by extending existing/given ATG OOTB component.
As part of custom droplet, new java (class) file and a property file need to be created.

Why it is required:
When existing functionality of ATG given OOTB component is not sufficient or
-   Customization is required based on requirement or
-   More specific implementation of given functionality need to be provided (like creating custom droplet for tax calculation which will override ATG given tax calculations).

A droplet is basically ATG's custom servlet which has some atg-specific customization. Just like we use HttpServlet in J2EE, we have have DynamoServlet class which implements javax.servlet.Servlet interface in ATG.
 Step 1: Create a java class extending atg.servlet.DynamoServlet and overriding the service (DynamoHttpServletRequest pRequest, DynamoHttpServletResponce pResponse) throw ServletException, IOException method.


Step 2:Create ATG Component for the class, The scope of the component should be global.
          $class = com.test.droplet.ParamaterDroplet
          $scope=global
          $description=print the value under droplet
Step 3:Declare the droplet in the JSP


Step 4:I Three way we can pass input Parameter into JSP Side:
          - Using value tag
          - Using param tag
          - Using bean tag
           Input Paramater Java Side:
           -   String current=pRequest.getParamater(PARAM_CURRENT_PAGE);




No comments: