|
From: <pe...@us...> - 2003-12-15 23:32:43
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/servlets
In directory sc8-pr-cvs1:/tmp/cvs-serv26173/src/java/org/neuclear/commons/servlets
Modified Files:
ServletTools.java
Log Message:
added ServletTools.getInitParam() which first tries the ServletConfig, then the context config.
All the web.xml's have been updated to support this. Also various further generalizations have been done throughout
for getServiceid(), getTitle(), getSigner()
Index: ServletTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/servlets/ServletTools.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ServletTools.java 12 Dec 2003 19:27:38 -0000 1.3
--- ServletTools.java 15 Dec 2003 23:32:40 -0000 1.4
***************
*** 1,4 ****
--- 1,9 ----
/* $Id$
* $Log$
+ * Revision 1.4 2003/12/15 23:32:40 pelle
+ * added ServletTools.getInitParam() which first tries the ServletConfig, then the context config.
+ * All the web.xml's have been updated to support this. Also various further generalizations have been done throughout
+ * for getServiceid(), getTitle(), getSigner()
+ *
* Revision 1.3 2003/12/12 19:27:38 pelle
* All the Cactus tests now for signing servlet.
***************
*** 43,47 ****
--- 48,55 ----
package org.neuclear.commons.servlets;
+ import org.neuclear.commons.Utility;
+
import javax.servlet.http.HttpServletRequest;
+ import javax.servlet.ServletConfig;
import java.io.PrintWriter;
***************
*** 67,73 ****
out.println("</style></head><body bgcolor=\"#FFFFFF\"><div id=\"banner\"><table bgcolor=\"#0000ff\" width=\"100%\"><tr><td><h3 style=\"color: white\">");
out.println(title);
! out.println("</h3></td><td align=\"right\"><img src=\"images/logo.gif\"></td></tr></table></div>");
}
}
--- 75,85 ----
out.println("</style></head><body bgcolor=\"#FFFFFF\"><div id=\"banner\"><table bgcolor=\"#0000ff\" width=\"100%\"><tr><td><h3 style=\"color: white\">");
out.println(title);
! out.println("</h3></td><td align=\"right\"></td></tr></table></div>");
+ }
+
+ public static String getInitParam(String name, ServletConfig config){
+ return Utility.denullString(config.getInitParameter(name),config.getServletContext().getInitParameter(name));
}
}
|