luehe       2003/03/27 14:51:45

  Modified:    jasper2/src/share/org/apache/jasper/resources
                        messages.properties
               jasper2/src/share/org/apache/jasper/compiler Validator.java
  Log:
  Replaced jsp.error.noMethod, which was not defined in properties file, with 
jsp.error.noFunctionMethod
  
  Revision  Changes    Path
  1.110     +3 -3      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- messages.properties       25 Mar 2003 00:18:25 -0000      1.109
  +++ messages.properties       27 Mar 2003 22:51:45 -0000      1.110
  @@ -373,7 +373,7 @@
   jsp.error.jsproot.version.invalid=Invalid version number: \"{0}\", must be \"1.2\" 
or \"2.0\"
   jsp.error.noFunctionPrefix=The function {0} must be used with a prefix when a 
default namespace is not specified
   jsp.error.noFunction=The function {0} cannot be located with the specified prefix
  -jsp.error.noFunctionMethod=The method {0} for the function {1} is not defined in 
the class {2}
  -jsp.error.function.classnotfound=The class {0} specified in TLD for the function 
{1} cannot be found. {2}
  +jsp.error.noFunctionMethod=Method \"{0}\" for function \"{1}\" not found in class 
\"{2}\"
  +jsp.error.function.classnotfound=The class {0} specified in TLD for the function 
{1} cannot be found: {2}
   jsp.error.signature.classnotfound=The class {0} specified in the method signature 
in TLD for the function {1} cannot be found. {2}
   
  
  
  
  1.99      +20 -18    
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java
  
  Index: Validator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- Validator.java    25 Mar 2003 01:49:29 -0000      1.98
  +++ Validator.java    27 Mar 2003 22:51:45 -0000      1.99
  @@ -1238,8 +1238,7 @@
                                "jsp.error.attribute.invalidPrefix", prefix);
                        }
                    }
  -                 TagLibraryInfo taglib = 
  -                                     (TagLibraryInfo) taglibs.get(uri);
  +                 TagLibraryInfo taglib = (TagLibraryInfo) taglibs.get(uri);
                    FunctionInfo funcInfo = null;
                    if (taglib != null) {
                        funcInfo = taglib.getFunction(function);
  @@ -1274,12 +1273,12 @@
            int start = signature.indexOf(' ');
            if (start < 0) {
                err.jspError("jsp.error.tld.fn.invalid.signature",
  -                     func.getPrefix(), func.getName());
  +                          func.getPrefix(), func.getName());
            }
            int end = signature.indexOf('(');
            if (end < 0) {
                err.jspError("jsp.error.tld.fn.invalid.signature.parenexpected",
  -                     func.getPrefix(), func.getName());
  +                          func.getPrefix(), func.getName());
            }
            return signature.substring(start+1, end).trim();
        }
  @@ -1304,7 +1303,7 @@
                    p = signature.indexOf(')', start);
                    if (p < 0) {
                        err.jspError("jsp.error.tld.fn.invalid.signature",
  -                             func.getPrefix(), func.getName());
  +                                  func.getPrefix(), func.getName());
                    }
                    lastArg = true;
                }
  @@ -1327,7 +1326,8 @@
                    fnmap.put(fnQName, method);
                }
   
  -             public Method resolveFunction(String prefix, String localName) {
  +             public Method resolveFunction(String prefix,
  +                                           String localName) {
                    return (Method) this.fnmap.get(prefix + ":" + localName);
                }
            }
  @@ -1348,9 +1348,9 @@
                                n.getFunctionInfo().getFunctionClass());
                    } catch (ClassNotFoundException e) {
                        err.jspError("jsp.error.function.classnotfound",
  -                             n.getFunctionInfo().getFunctionClass(),
  -                             n.getPrefix() + ':' + n.getName(),
  -                             e.getMessage());
  +                                  n.getFunctionInfo().getFunctionClass(),
  +                                  n.getPrefix() + ':' + n.getName(),
  +                                  e.getMessage());
                    }
                    String paramTypes[] = n.getParameters();
                    int size = paramTypes.length;
  @@ -1360,15 +1360,17 @@
                        for (i = 0; i < size; i++) {
                            params[i] = JspUtil.toClass(paramTypes[i], loader);
                        }
  -                     method = c.getDeclaredMethod(n.getMethodName(), params);
  +                     method = c.getDeclaredMethod(n.getMethodName(),
  +                                                  params);
                    } catch (ClassNotFoundException e) {
                        err.jspError("jsp.error.signature.classnotfound",
  -                             paramTypes[i],
  -                             n.getPrefix() + ':' + n.getName(),
  -                             e.getMessage());
  +                                  paramTypes[i],
  +                                  n.getPrefix() + ':' + n.getName(),
  +                                  e.getMessage());
                    } catch (NoSuchMethodException e ) {
  -                     err.jspError("jsp.error.noMethod", n.getName(),
  -                             n.getMethodName(), c.getName());
  +                     err.jspError("jsp.error.noFunctionMethod",
  +                                  n.getMethodName(), n.getName(),
  +                                  c.getName());
                    }
                    fmapper.mapFunction(n.getPrefix() + ':' + n.getName(),
                                        method);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to