You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jeffrey Bonevich <bo...@telocity.com> on 2001/01/31 05:06:26 UTC

Re: PATCH: tagdependent tags should not parse content

I found the following message in the archives for tomcat-dev from Dec
1999.  It appears to never have been introduced to the distribution or
to CVS or anything.  Wondering what the status of a fix might be.

*********************************************************************

To: <to...@jakarta.apache.org> 
Subject: PATCH: tagdependent tags should not parse content 
From: "Danno Ferrin" <DF...@novell.com> 
Date: Wed, 08 Dec 1999 18:19:24 -0700 

The bodycontent=tagdependent should provide a literal copy of the tag
content.  =JSP will handle JSP elements first, but tagdependent
shoudlnt.

Index: src/share/org/apache/jasper/compiler/Parser.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/Parser.java,v
retrieving revision 1.6
diff -C3 -r1.6 Parser.java
*** Parser.java 1999/11/08 03:14:27     1.6
--- Parser.java 1999/12/09 01:17:40
***************
*** 752,758 ****
                              String tagEnd = "</"+tag+">";
                              // Parse until the end of the tag body. 
                              // Then skip the tag end... 
!                             parser.parse(tagEnd);
                              reader.advance(tagEnd.length());
                              listener.handleTagEnd(bodyStart,
reader.mark(), prefix, 
                                                    shortTagName, attrs,
tli, ti);
--- 752,764 ----
                              String tagEnd = "</"+tag+">";
                              // Parse until the end of the tag body. 
                              // Then skip the tag end... 
!                             if
(bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT))
!                                 // accept no core elements for tag
dependent,
!                                 // i.e. literal inclusion of the
content
!                                 parser.parse(tagEnd, new Class[] {});
!                             else
!                                 // it is JSP body content, so accept
all core elements
!                                 parser.parse(tagEnd);
                              reader.advance(tagEnd.length());
                              listener.handleTagEnd(bodyStart,
reader.mark(), prefix, 
                                                    shortTagName, attrs,
tli, ti);



-- 
Jeffrey & Nikole Bonevich
Maxmillian Bonevich
Ann Arbor, Michigan
bonevich@dsl.telocity.com
http://www.bonevich.com

Re: PATCH: tagdependent tags should not parse content

Posted by Jeffrey Bonevich <bo...@telocity.com>.
Another update:

I was screwed to begin with - Parser was cutting out even before it got
to the relevant section of code because the compiled JSP was sitting in
$TOMCAT_HOME/work/localhost8080%2Fmodel2test/!  D'oh! 

Therefore, the patch DOES work.  Who do I contact to get this put into
production???

Jeffrey Bonevich wrote:
> 
> BTW I forgot to mention that I tried applying this patch myself to the
> Parser.java source code, without success - the patch as is does not
> appear to resolve the issue.
> 
> Jeffrey Bonevich wrote:
> >
> > I found the following message in the archives for tomcat-dev from Dec
> > 1999.  It appears to never have been introduced to the distribution or
> > to CVS or anything.  Wondering what the status of a fix might be.
> >
> > *********************************************************************
> >
> > To: <to...@jakarta.apache.org>
> > Subject: PATCH: tagdependent tags should not parse content
> > From: "Danno Ferrin" <DF...@novell.com>
> > Date: Wed, 08 Dec 1999 18:19:24 -0700
> >
> > The bodycontent=tagdependent should provide a literal copy of the tag
> > content.  =JSP will handle JSP elements first, but tagdependent
> > shoudlnt.
> >
> > Index: src/share/org/apache/jasper/compiler/Parser.java
> > ===================================================================
> > RCS file:
> > /home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/Parser.java,v
> > retrieving revision 1.6
> > diff -C3 -r1.6 Parser.java
> > *** Parser.java 1999/11/08 03:14:27     1.6
> > --- Parser.java 1999/12/09 01:17:40
> > ***************
> > *** 752,758 ****
> >                               String tagEnd = "</"+tag+">";
> >                               // Parse until the end of the tag body.
> >                               // Then skip the tag end...
> > !                             parser.parse(tagEnd);
> >                               reader.advance(tagEnd.length());
> >                               listener.handleTagEnd(bodyStart,
> > reader.mark(), prefix,
> >                                                     shortTagName, attrs,
> > tli, ti);
> > --- 752,764 ----
> >                               String tagEnd = "</"+tag+">";
> >                               // Parse until the end of the tag body.
> >                               // Then skip the tag end...
> > !                             if
> > (bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT))
> > !                                 // accept no core elements for tag
> > dependent,
> > !                                 // i.e. literal inclusion of the
> > content
> > !                                 parser.parse(tagEnd, new Class[] {});
> > !                             else
> > !                                 // it is JSP body content, so accept
> > all core elements
> > !                                 parser.parse(tagEnd);
> >                               reader.advance(tagEnd.length());
> >                               listener.handleTagEnd(bodyStart,
> > reader.mark(), prefix,
> >                                                     shortTagName, attrs,
> > tli, ti);
> >
> > --
> > Jeffrey & Nikole Bonevich
> > Maxmillian Bonevich
> > Ann Arbor, Michigan
> > bonevich@dsl.telocity.com
> > http://www.bonevich.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, email: tomcat-dev-help@jakarta.apache.org
> 
> --
> Jeffrey & Nikole Bonevich
> Maxmillian Bonevich
> Ann Arbor, Michigan
> bonevich@dsl.telocity.com
> http://www.bonevich.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org

-- 
Jeffrey & Nikole Bonevich
Maxmillian Bonevich
Ann Arbor, Michigan
bonevich@dsl.telocity.com
http://www.bonevich.com

Re: PATCH: tagdependent tags should not parse content

Posted by Jeffrey Bonevich <bo...@telocity.com>.
BTW I forgot to mention that I tried applying this patch myself to the
Parser.java source code, without success - the patch as is does not
appear to resolve the issue.

Jeffrey Bonevich wrote:
> 
> I found the following message in the archives for tomcat-dev from Dec
> 1999.  It appears to never have been introduced to the distribution or
> to CVS or anything.  Wondering what the status of a fix might be.
> 
> *********************************************************************
> 
> To: <to...@jakarta.apache.org>
> Subject: PATCH: tagdependent tags should not parse content
> From: "Danno Ferrin" <DF...@novell.com>
> Date: Wed, 08 Dec 1999 18:19:24 -0700
> 
> The bodycontent=tagdependent should provide a literal copy of the tag
> content.  =JSP will handle JSP elements first, but tagdependent
> shoudlnt.
> 
> Index: src/share/org/apache/jasper/compiler/Parser.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/Parser.java,v
> retrieving revision 1.6
> diff -C3 -r1.6 Parser.java
> *** Parser.java 1999/11/08 03:14:27     1.6
> --- Parser.java 1999/12/09 01:17:40
> ***************
> *** 752,758 ****
>                               String tagEnd = "</"+tag+">";
>                               // Parse until the end of the tag body.
>                               // Then skip the tag end...
> !                             parser.parse(tagEnd);
>                               reader.advance(tagEnd.length());
>                               listener.handleTagEnd(bodyStart,
> reader.mark(), prefix,
>                                                     shortTagName, attrs,
> tli, ti);
> --- 752,764 ----
>                               String tagEnd = "</"+tag+">";
>                               // Parse until the end of the tag body.
>                               // Then skip the tag end...
> !                             if
> (bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT))
> !                                 // accept no core elements for tag
> dependent,
> !                                 // i.e. literal inclusion of the
> content
> !                                 parser.parse(tagEnd, new Class[] {});
> !                             else
> !                                 // it is JSP body content, so accept
> all core elements
> !                                 parser.parse(tagEnd);
>                               reader.advance(tagEnd.length());
>                               listener.handleTagEnd(bodyStart,
> reader.mark(), prefix,
>                                                     shortTagName, attrs,
> tli, ti);
> 
> --
> Jeffrey & Nikole Bonevich
> Maxmillian Bonevich
> Ann Arbor, Michigan
> bonevich@dsl.telocity.com
> http://www.bonevich.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org

-- 
Jeffrey & Nikole Bonevich
Maxmillian Bonevich
Ann Arbor, Michigan
bonevich@dsl.telocity.com
http://www.bonevich.com