If you want to run Servlets in your Oracle ATG Commerce application, there isn’t an easy way to expose them as Servlets AND take full advantage of the ATG component dependency and lifecycle system.
We’ve written a very simple Servlet Bridge which allows you to expose an ATG managed Servlet component as a normal Servlet via web.xml.
1. You write your Servlet class extending atg.nucleus.servlet.HttpServletService and treat it as a normal ATG component, configuring component properties, etc…. You put your Servlet logic in the service method. You configure it just like a normal ATG component.
2. You have our Sparkred ServletBridge class in your classpath.
3. You create an entry in your web.xml for each Servlet you want mapped. Each entry has a unique name, and points to the ATG component path of your Servlet class:
You can see the Sparkred ATG ServletBridge and use it in your own application.