tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Rodriguez <trod...@parc.xerox.com>
Subject PATCH: src/share/org/apache/jasper/compiler/TagBeginGenerator.java
Date Mon, 15 Nov 1999 18:34:46 GMT
Slightly improved error message when a tag implementation is missing
required setter methods.  I just added the classname of the tag
implementation to the message so that it's easier to figure out where
your problem is.  Feel free to change the message format.  It ends up
looking like this:

org.apache.jasper.JasperException: class
placeless.apps.haymaker.tags.PostHandlerTag: Unable to find setter
method for attribute: scope

tom

Index: src/share/org/apache/jasper/compiler/TagBeginGenerator.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagBeginGenerator.java,v
retrieving revision 1.7
diff -c -r1.7 TagBeginGenerator.java
*** TagBeginGenerator.java	1999/11/08 03:14:29	1.7
--- TagBeginGenerator.java	1999/11/16 02:27:51
***************
*** 183,189 ****
                      if (m == null)
                          throw 
                              new
JasperException(Constants.getString("jsp.error.unable.to_find_method",
!                                                                    
new Object[] { attrName }));
                  
                     
writer.println(thVarName+"."+m.getName()+"("+attrValue+");");
                  }
--- 183,189 ----
                      if (m == null)
                          throw 
                              new
JasperException(Constants.getString("jsp.error.unable.to_find_method",
!                                                                    
new Object[] { attrName, tc.getTagHandlerClass() }));
                  
                     
writer.println(thVarName+"."+m.getName()+"("+attrValue+");");
                  }


Index: src/share/org/apache/jasper/resources/messages.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/resources/messages.properties,v
retrieving revision 1.5
diff -c -r1.5 messages.properties
*** messages.properties	1999/11/03 23:43:41	1.5
--- messages.properties	1999/11/16 02:28:28
***************
*** 131,137 ****
  <.jsp files>
  jsp.message.cp_is=Classpath {0} is: {1}
  jsp.error.unable.to_load_taghandler_class=Unable to load tag handler
class {0} because of {1}
! jsp.error.unable.to_find_method=Unable to find setter method for
attribute: {0}
  jsp.error.unable.to_introspect=Unable to introspect on tag handler
class: {0} because of {1}
  jsp.error.invalid_attributes=Attributes are invalid according to
TagInfo
  jsp.error.bad_tag=No such tag {0} in the tag library imported with
prefix {1}
--- 131,137 ----
  <.jsp files>
  jsp.message.cp_is=Classpath {0} is: {1}
  jsp.error.unable.to_load_taghandler_class=Unable to load tag handler
class {0} because of {1}
! jsp.error.unable.to_find_method={1}: Unable to find setter method for
attribute: {0}
  jsp.error.unable.to_introspect=Unable to introspect on tag handler
class: {0} because of {1}
  jsp.error.invalid_attributes=Attributes are invalid according to
TagInfo
  jsp.error.bad_tag=No such tag {0} in the tag library imported with
prefix {1}

Mime
View raw message