To use Oracle ATG Web Commerce platform functionality, a web application needs to start Nucleus by invoking NucleusServlet. This servlet does not need to have any paths mapped to it, but must have the load-on-startup flag set to 1 so that it runs before any other Oracle ATG Web Commerce component. The web.xml file in atg_bootstrap.war includes the following lines:


The NucleusServlet creates an instance of Nucleus and sets it as an attribute of the web application. The Nucleus instance can be retrieved using the Nucleus.getGlobalNucleus() method.

Note: When you declare servlets in web.xml, you can use optional load-on-startup tags to determine the order the servlets are called. If you do not use these tags, the servlets are called in the order that they appear in web.xml. Because NucleusServlet must run first, its load-on-startup value must be 1, as in the example above.