KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cayenne > tutorial > tapestry > ArtistAppServlet


1 package cayenne.tutorial.tapestry;
2
3 import javax.servlet.ServletConfig JavaDoc;
4 import javax.servlet.ServletException JavaDoc;
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 Schneider
16  */

17 public class ArtistAppServlet extends ApplicationServlet {
18     /**
19      * @see javax.servlet.Servlet#init(ServletConfig)
20      */

21     public void init(ServletConfig JavaDoc config) throws ServletException JavaDoc {
22         super.init(config);
23         Configuration.setLoggingLevel(Level.WARN);
24         
25         // [OPTIONAL STEP] Configure shared Cayenne configuration object
26
// to be able to locate XML config files under WEB-INF in addition to CLASSPATH
27
ServletUtil.initializeSharedConfiguration(config.getServletContext());
28     }
29 }
Popular Tags