1 package cayenne.tutorial.tapestry;2 3 import javax.servlet.ServletConfig ;4 import javax.servlet.ServletException ;5 6 import org.apache.log4j.Level;7 import org.apache.tapestry.ApplicationServlet;8 import org.objectstyle.cayenne.conf.ServletUtil;9 import org.objectstyle.cayenne.conf.Configuration;10 11 /**12 * The main servlet class for the application. Links the 13 * servlet container with the artist application.14 * 15 * @author Eric Schneider16 */17 public class ArtistAppServlet extends ApplicationServlet {18 /**19 * @see javax.servlet.Servlet#init(ServletConfig)20 */21 public void init(ServletConfig config) throws ServletException {22 super.init(config);23 Configuration.setLoggingLevel(Level.WARN);24 25 // [OPTIONAL STEP] Configure shared Cayenne configuration object26 // to be able to locate XML config files under WEB-INF in addition to CLASSPATH27 ServletUtil.initializeSharedConfiguration(config.getServletContext());28 }29 }