Write a custom droplet in ATG.

Droplets/ATG Servlet Beans are one of the most important out of the box components provided by ATG. Droplet is nothing but a Servlet, Droplets are mainly used to abstract out the business logic in server side code. Droplet helps the developer to separate the presentation code from the business logic code. You may write your own Droplet if the provided Droplets are not meeting your requirements.

Droplet Static Design

dropletStatic

steps to write a custom droplet

1. Write a java class which extends the atg.servlet.DynamoServlet class. Write the custom business logic inside the service method.

2. Write a property file to expose your Droplet as a component in ATG Nucleus.

3. Place the CalculatorDroplet.properties file in the correct configuration location. This would register the CalculatorDroplet as component in ATG Nucleus.

calcDropComponent

4. Use the CalculatroDroplet in the jsp using dsp:droplet tag library.

5. Load the calculator.jsp in browser.

dropletResult.jpg

Your custom Droplet is up and running now!

13 thoughts on “Write a custom droplet in ATG.

  1. helpful article for the starters as well as experts , neat explanation.. can you provide an example for the formHandler also.

Leave a Reply to Avin Cancel reply

Your email address will not be published. Required fields are marked *