[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Fri Mar 17 01:12:19 UTC 2006


gss
Thu Mar 16 20:12:19 EST 2006
Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets
In directory pub.open-bio.org:/tmp/cvs-serv9201/src/org/semanticmoby/ref/servlets

Modified Files:
	BaseServlet.java 
Added Files:
	InitServlet.java 
Log Message:
Moved initialization functionality into InitServlet

s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets InitServlet.java,NONE,1.1 BaseServlet.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java	2006/01/07 01:15:49	1.9
+++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java	2006/03/17 01:12:18	1.10
@@ -6,65 +6,24 @@
 import javax.servlet.*;
 import javax.servlet.http.*;
 
-import org.apache.log4j.*;
-
-
 /**
  * A common base class for servlets that are part of the
  * Semantic MOBY site itself.
  */
 public abstract class BaseServlet extends HttpServlet {
 
-    private static boolean log4jInitialized = false;
     public HttpServletRequest     request;
     public HttpServletResponse    response;
     public DataBean               dataBean;
 
     /**
-     * Perform various initialization tasks.
-     */
-    public void init() throws UnavailableException {
-
-        // initialize local variables
-        ServletContext ctx = getServletContext();
-
-        // Initialize the MOBYProperties class.
-        try {
-
-            MOBYProperties.initProps(ctx);
-        } catch (FileNotFoundException e) {
-
-            e.printStackTrace();
-            ctx.log(e, "MOBY properties file was not found");
-            throw new UnavailableException(this, e.getMessage());
-        } catch (IOException e) {
-
-            e.printStackTrace();
-            ctx.log(e, "MOBY properties file could not be read");
-            throw new UnavailableException(this, e.getMessage());
-        }
-
-        // Initialize log4j
-        synchronized (BaseServlet.class) {
-
-            if (!log4jInitialized) {
-
-                String path = ctx.getRealPath("/WEB-INF/log4j.properties");
-                PropertyConfigurator.configure(path);
-                log4jInitialized = true;
-            }
-        }
-    }
-
-
-    /**
      * Don't handle a get request, instead just forward the page back to the
      * index.jsp page.
      */
     public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
-
-        getServletContext().getRequestDispatcher("/index.jsp").forward(request,
-                                                                       response);
+        getServletContext()
+            .getRequestDispatcher("/index.jsp")
+            .forward(request, response);
     }
 }




More information about the MOBY-guts mailing list