Adding a new ImageMagickImageProcessor class to replace
[mir.git] / source / mir / servlet / ServletModuleDispatch.java
index f5e841b..5fd290e 100755 (executable)
@@ -42,10 +42,9 @@ import mir.log.LoggerWrapper;
  * Dispatcher, calls the method passed to ServletModule Class, through the "do"
  * Parameter (via POST or GET)
  *
- * @version $Id: ServletModuleDispatch.java,v 1.15.2.1 2003/09/03 17:49:38 zapata Exp $
- *
- * @Author rk
+ * @version $Id: ServletModuleDispatch.java,v 1.15.2.3 2005/07/27 11:46:14 grok Exp $
  *
+ * @author rk
  */
 public final class ServletModuleDispatch {
 
@@ -66,15 +65,16 @@ public final class ServletModuleDispatch {
    * @param aRequest
    * @param aResponse
    * @throws ServletModuleExc
-   * @throws ServletModuleUserExc
    * @throws ServletModuleFailure
    */
 
   public static void dispatch(ServletModule aServletModule, HttpServletRequest aRequest,
-       HttpServletResponse aResponse) throws ServletModuleExc, ServletModuleUserExc, ServletModuleFailure
-  {
+       HttpServletResponse aResponse) throws ServletModuleExc, ServletModuleFailure {
+    // look for requested method's name in the "do" http request param, 
+    // if not present, use default action 
     String doParam = aRequest.getParameter("do");
-    logger.info("ServletModuleDispatch: " + aServletModule.toString() + " with method " + doParam);
+    logger.debug("ServletModuleDispatch: " + aServletModule.toString() + " with method " + doParam);
+
     if (doParam == null) {
       if (aServletModule.defaultAction() != null)
         doParam = aServletModule.defaultAction();
@@ -82,6 +82,7 @@ public final class ServletModuleDispatch {
         throw new ServletModuleExc("no parameter do supplied!");
     }
 
+    // ok, we have the method's name, now call it
     try {
       Method method = aServletModule.getClass().getMethod(doParam,SIGNATURE);
       if (method != null) {