01: package com.jat.core;
02:
03: import javax.servlet.ServletException;
04: import javax.servlet.SingleThreadModel;
05: import javax.servlet.http.HttpServlet;
06:
07: /**
08: * <p>Title: JAT</p>
09: * <p>Description: </p>
10: * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
11: * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
12: * @author stf
13: * @version 1.0
14: */
15:
16: public class ProjectServlet extends HttpServlet implements
17: SingleThreadModel {
18: private static final String CONTENT_TYPE = "text/html";
19:
20: /** @link dependency
21: * @stereotype instantiate*/
22: /*# Project lnkProject; */
23: //Initialize global variables
24: public void init() throws ServletException {
25: try {
26: if (Project.getInstance() == null) {
27: String configFile = this .getInitParameter("config");
28: Project.create(configFile);
29: }
30: } catch (Exception ex) {
31: System.out
32: .println("ProjectServlet::init: exception: " + ex);
33: }
34: }
35:
36: //Clean up resources
37: public void destroy() {
38: }
39: }
|