[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Thu Nov 4 22:33:03 UTC 2004


gss
Thu Nov  4 17:33:03 EST 2004
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/smoby/ref/servlets
In directory pub.open-bio.org:/tmp/cvs-serv31978/src/org/smoby/ref/servlets

Modified Files:
	BaseServlet.java 
Log Message:
Added doc

moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/smoby/ref/servlets BaseServlet.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/smoby/ref/servlets/BaseServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/smoby/ref/servlets/BaseServlet.java	2004/07/21 22:01:19	1.2
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/semanticmoby.org/src/org/smoby/ref/servlets/BaseServlet.java	2004/11/04 22:33:03	1.3
@@ -1,17 +1,16 @@
 package org.smoby.ref.servlets;
 
 import java.io.*;
-import java.util.Hashtable;
-
+import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
-
 import org.smoby.ref.tools.*;
 import org.smoby.servlet.*;
 import org.apache.log4j.*;
 
 /**
- * A common base class for MOBY servlets
+ * A common base class for servlets that are part of the
+ * Semantic MOBY site itself.
  */
 public abstract class BaseServlet extends HttpServlet
 {
@@ -50,12 +49,22 @@
 		}
     }
 	
-	protected void startHTML(HttpServletResponse response, PrintStream out)
+    /**
+     * Write a standard batch of HTML, including the Semantic
+     * MOBY logo.
+     * @param response the servlet response object
+     * @param title the title to use for the browser page
+     * @param out print stream to which HTML should be written
+     */
+	protected void startHTML(HttpServletResponse response,
+			                 String title, PrintStream out)
 	{
 		response.setContentType("text/html");
 		out.println("<html>");
 		out.println("<head>");
-		out.println("<title>Semantic MOBY search results</title>");
+		out.print("<title>");
+		out.print(title);
+		out.println("</title>");
 		out.println("</head>");
 		out.println("<center>");
 		out.println("<h1>");
@@ -71,7 +80,11 @@
 		out.println("<font face=\"sans-serif\">");
 	}
 	
-	protected void finishHTML(HttpServletResponse response, PrintStream out)
+	/**
+	 * Write a closing batch of HTML to match what was written by
+	 * the startHTML() method
+	 */
+	protected void finishHTML(PrintStream out)
 	{
 		out.println("</font>");
 		out.println("</body>");




More information about the MOBY-guts mailing list