You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Jones <sc...@on-sitemanager.com> on 2000/11/29 17:36:45 UTC

Re: WML Generation from JSP broken!!!!

Could you not just replace your <?xml version="1.0"?> with
<% out.println("<?xml version=\"1.0\"?>"); %> ?

Seems like that would work to me...

Cheers,

-Scott

----- Original Message -----
From: "Alex Tang" <al...@airflash.com>
To: <to...@jakarta.apache.org>
Cc: <to...@jakarta.apache.org>; <di...@yahoo.com>; "Alex Tang"
<al...@airflash.com>
Sent: Wednesday, November 29, 2000 5:50 PM
Subject: Re: WML Generation from JSP broken!!!!


> Is there a way to get the compiler to ignore the "<?xml version="1.0"?>"
syntax?
>
> Otherwise this means that serving any page that is XML compliant (WML,
XHTML, etc) now requires a complete
> rewrite of all JSP files to run in 4.0.
>
> Thanks.
>
> ...alex...
>
>
> "Craig R. McClanahan" wrote:
>
> > Davanum Srinivas wrote:
> >
> > > Hi all,
> > > Attached is a JSP Sample file which generates WML. It works with no
problems on Tomcat3.1, but
> > > fails miserably with the latest dev nightly snapshot and m4. Can
someone shed light?
> > >
> >
> > Well, your page certainly doesn't work under Tomcat 4.0 (which
implements JSP 1.2).  Furthermore, it
> > *should* not.
> >
> > Because you are starting this page with an <?xml version="1.0"?>
directive, the JSP compiler assumes that
> > you have created this page in the XML syntax for JSP pages, as described
in the 1.2 spec
> > <http://java.sun.com/products/jsp/download.html>.  However, this page
violates several of the rules:
> > * It does not start with a <jsp:root> element (this is
> >   what the parse error is complaining about).
> > * It uses <% %> for a scriptlet, instead of the
> >   required <jsp:scriptlet> element.
> >
> > You will need to rewrite your page conforming to the new syntax rules in
order for it to work correctly
> > under 4.0.
> >
> > >
> > > Thanks in advance,
> > > dims
> > >
> > > PS: Am not currently subscribed to the list. So please CC me at
"dims@yahoo.com"
> > >
> >
> > Craig McClanahan
> >
> > PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML
syntax, so it just passed the <?xml?>
> > directive through as template text.
>
>