You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Michael G. Anderson C.T.O" <RI...@home.com> on 2000/12/02 05:34:45 UTC
Re: More on JSP in XML format -- This, is a very excellent post!
This, is a very excellent post!
Anne and Bill Moore wrote:
> Pierre Delisle wrote:
> >
> > <jsp:cdata> is currently not supported in tomcat-4.0.
> > You can either put the template data directly in the
> > jsp page, or you can simply use the standard XML tag
> > for CDATA: <![CDATA[... ]]>.
> >
> > Give it a try and let me know.
> >
> > Please report any JSP page in XML syntax that does not
> > work (except for the <jsp:cdata>). I'll make sure
> > the proper fixes are committed.
> >
> Pierre
> The CDATA approach works as you suggested, so I have continued my
> testing - I am using the Tomcat example jsps as my starting point - I
> aim to have an XML representation of each Tomcat example jsp.
>
> I have now found a bug with scriplets.
> The < character in a scriptlet are being parsed as if it were markup
> rather than being treated as Java syntax less than symbol.
>
> For example the scriptlet
>
> <%
> for(int i=0; i<6; i++)
> out.println(i);
> %>
>
> works as expected in standard format jsp.
>
> The xml format scriplet shown below produces an exception
> org.apache.jasper.compiler.ParseException The content beginning "<6" is
> not legal markup
>
> <jsp:scriptlet>
>
> for(int i=0; i<6; i++)
> out.println(i);
>
> </jsp:scriptlet>
>
> When you asked me to report bugs I was not sure if you mneant for me to
> enter them to bugrat - I created Bug Report #511 with synopsis
> "Error in parsing scriptlet when jsp is in xml format " to describe this
> problem.
>
> BTW Bugrat seemed to mangle the example scriptlet I entered in the
> problem description and seems to have lost the comment I put in the How
> to reproduce section.
>
> --
> Thanks and Regards
> Anne and Bill Moore
> nzmoore@bellsouth.net
> Remember: Life is too short to drink bad wine!!!
Re: More on JSP in XML format -- This, is a very excellent post!
Posted by Bap <li...@a1.org.uk>.
Bap wrote:
> "Michael G. Anderson C.T.O" wrote:
>
> > This, is a very excellent post!
> >
> > Anne and Bill Moore wrote:
> >
> > > Pierre Delisle wrote:
> > > I have now found a bug with scriplets.
> > > The < character in a scriptlet are being parsed as if it were markup
> > > rather than being treated as Java syntax less than symbol.
> > >
> > > For example the scriptlet
> > >
> > > <%
> > > for(int i=0; i<6; i++)
> > > out.println(i);
> > > %>
> > >
> > > works as expected in standard format jsp.
> > >
> > > The xml format scriplet shown below produces an exception
> > > org.apache.jasper.compiler.ParseException The content beginning "<6" is
> > > not legal markup
> > >
> > > <jsp:scriptlet>
> > >
> > > for(int i=0; i<6; i++)
> > > out.println(i);
> > >
> > > </jsp:scriptlet>
> > >
>
> The above is not valid XML, you cannot use < within a section of XML, unless
> it is within a CDATA section or is the start of a start tag.
>
> Bap.
sorry, "The above is not well-formed XML"
Re: More on JSP in XML format -- This, is a very excellent post!
Posted by Bap <li...@a1.org.uk>.
"Michael G. Anderson C.T.O" wrote:
> This, is a very excellent post!
>
> Anne and Bill Moore wrote:
>
> > Pierre Delisle wrote:
> > I have now found a bug with scriplets.
> > The < character in a scriptlet are being parsed as if it were markup
> > rather than being treated as Java syntax less than symbol.
> >
> > For example the scriptlet
> >
> > <%
> > for(int i=0; i<6; i++)
> > out.println(i);
> > %>
> >
> > works as expected in standard format jsp.
> >
> > The xml format scriplet shown below produces an exception
> > org.apache.jasper.compiler.ParseException The content beginning "<6" is
> > not legal markup
> >
> > <jsp:scriptlet>
> >
> > for(int i=0; i<6; i++)
> > out.println(i);
> >
> > </jsp:scriptlet>
> >
The above is not valid XML, you cannot use < within a section of XML, unless
it is within a CDATA section or is the start of a start tag.
Bap.