horwat      01/07/12 16:29:35

  Modified:    jasper/src/share/org/apache/jasper/compiler Parser.java
               jasper/src/share/org/apache/jasper/resources
                        messages.properties
  Log:
  Include and forward do not take params tag. Clear up error message and make sure 
that the reader doesn't simply match on "jsp:param".
  
  Bugzilla #1818
  
  Revision  Changes    Path
  1.12      +5 -5      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Parser.java       2001/06/02 18:44:45     1.11
  +++ Parser.java       2001/07/12 23:29:31     1.12
  @@ -258,7 +258,7 @@
        private static final String CLOSE_INCLUDE_NO_BODY = "/>";
        private static final String CLOSE_INCLUDE_BODY = ">";
        private static final String CLOSE_INCLUDE = "</jsp:include>";
  -     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param";
  +     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param ";
        private static final String CLOSE_INDIVIDUAL_PARAM = "/>";
   
        private static final JspUtil.ValidAttribute[] validAttributes = {
  @@ -295,7 +295,7 @@
                        if (!reader.matches (OPEN_INDIVIDUAL_PARAM))
                            throw new ParseException (reader.mark(),
                                                      Constants.getString
  -                                                   ("jsp.error.paramexpected"));
  +                                                   ("jsp.error.paramexpectedonly"));
   
                        //Parse zero or more param tags.
                        while (reader.matches(OPEN_INDIVIDUAL_PARAM)) {
  @@ -343,7 +343,7 @@
        private static final String CLOSE_FORWARD_NO_BODY = "/>";
        private static final String CLOSE_FORWARD_BODY = ">";
        private static final String CLOSE_FORWARD = "</jsp:forward>";
  -     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param";
  +     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param ";
        private static final String CLOSE_INDIVIDUAL_PARAM = "/>";
   
        private static final JspUtil.ValidAttribute[] validAttributes = {
  @@ -376,7 +376,7 @@
                        if (!reader.matches (OPEN_INDIVIDUAL_PARAM))
                            throw new ParseException (reader.mark(),
                                                      Constants.getString
  -                                                   ("jsp.error.paramexpected"));
  +                                                   ("jsp.error.paramexpectedonly"));
                        // Parse zero or more param tags.
                        while (reader.matches(OPEN_INDIVIDUAL_PARAM)) {
                            
  @@ -915,7 +915,7 @@
        private static final String CLOSE_PLUGIN = "</jsp:plugin>";
        private static final String OPEN_PARAMS = "<jsp:params>";
        private static final String CLOSE_PARAMS = "</jsp:params>";
  -     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param";
  +     private static final String OPEN_INDIVIDUAL_PARAM = "<jsp:param ";
        private static final String CLOSE_INDIVIDUAL_PARAM = "/>";
        private static final String OPEN_FALLBACK = "<jsp:fallback>";
        private static final String CLOSE_FALLBACK = "</jsp:fallback>";
  
  
  
  1.19      +2 -1      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- messages.properties       2001/07/12 21:41:31     1.18
  +++ messages.properties       2001/07/12 23:29:33     1.19
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.18 2001/07/12 21:41:31 horwat Exp $
  +# $Id: messages.properties,v 1.19 2001/07/12 23:29:33 horwat Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is en_US
  @@ -96,6 +96,7 @@
   jsp.error.attempt_to_clear_flushed_buffer=Error: Attempt to clear a buffer that's 
already been flushed
   jsp.error.overflow=Error: JSP Buffer overflow
   jsp.error.paramexpected=Expected \"param\" tag with \"name\" and \"value\" 
attributes after the \"params\" tag.
  +jsp.error.paramexpectedonly=Expected \"param\" tag with \"name\" and \"value\" 
attributes without the \"params\" tag.
   jsp.error.closeindividualparam=param tag needs to be closed with \"/>\"
   jsp.error.closeparams=param tag needs to be closed with /params
   jsp.error.plugin.notype=type not declared in jsp:plugin
  
  
  

Reply via email to