[MOBY-guts] biomoby commit

Lonny Montoya lxm at pub.open-bio.org
Fri Mar 17 18:44:17 UTC 2006


lxm
Fri Mar 17 13:44:17 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-serv11648/src/org/semanticmoby/ref/servlets

Modified Files:
	InitServlet.java 
Log Message:
several small bugfixes,
fix to aboutURI of tair-mapviewer,
added static block to Log for static initialization,
added the next build tag (build-2006-3a) to the footer,
reformatted the search results page as the proxy resources now
have about URIs to display


s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets InitServlet.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/InitServlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/InitServlet.java	2006/03/17 01:12:18	1.1
+++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/InitServlet.java	2006/03/17 18:44:17	1.2
@@ -28,56 +28,64 @@
  * mapping in web.xml.
  */
 public class InitServlet extends HttpServlet {
-	
-	/**
-	 * Contains any code that needs to be run when the servlet container
-	 * starts up. 
-	 */
-	public void init() throws ServletException {
-		
-		ServletContext ctx = getServletContext();
-		
-		// Read the smoby.properties file
+
+    /**
+     * Contains any code that needs to be run when the servlet container
+     * starts up.
+     */
+    public void init() throws ServletException {
+
+        ServletContext ctx = getServletContext();
+
+        // Read the smoby.properties file
         try {
+
             MOBYProperties.initProps(ctx);
-        } catch (FileNotFoundException e) {
+        }
+
+        catch (FileNotFoundException e) {
+
             Log.error("MOBY properties file was not found");
             throw new ServletException(e);
-        } catch (IOException e) {
-        	Log.error("MOBY properties file could not be read");
+        }
+
+        catch (IOException e) {
+
+            Log.error("MOBY properties file could not be read");
             throw new ServletException(e);
         }
-        
+
         // Initialize logging
         String path = ctx.getRealPath("/WEB-INF/log4j.properties");
         PropertyConfigurator.configure(path);
         Log.init(ctx.getRealPath("/smoby-log.html"));
-        
+
         // Initialize some system properties pertaining to HTTP proxies
         try {
-	        System.getProperties().put(
-		        "http.proxySet",
-		        MOBYProperties.getProperty("PROXY_SET", false));
-	        System.getProperties().put(
+
+            System.getProperties().put(
+                "http.proxySet",
+                MOBYProperties.getProperty("PROXY_SET", false));
+            System.getProperties().put(
                 "http.proxyHost",
                 MOBYProperties.getProperty("PROXY_HOST", false));
-	        System.getProperties().put(
+            System.getProperties().put(
                 "http.proxyPort",
                 MOBYProperties.getProperty("PROXY_PORT", false));
+        }
 
-            Context initCtx = new InitialContext();
-            Context envCtx = (Context) initCtx.lookup("java:comp/env");
-            DataBean dataBean = (DataBean) envCtx.lookup("bean/DataBeanFactory");
-	        dataBean.setInitialized(true);
-	        
-        } catch (Throwable t) {
-        	t.printStackTrace();
+        catch (Exception e) {
+
+            e.printStackTrace();
+            throw new ServletException(e);
         }
-	}
-	
-	/**
-	 * Contains any code that needs to be run when the servlet container
-	 * is shut down.
-	 */
-	public void destroy() {}
+    }
+
+
+    /**
+     * Contains any code that needs to be run when the servlet container
+     * is shut down.
+     */
+    public void destroy() {
+    }
 }




More information about the MOBY-guts mailing list