On Tue, 14 Jan 2003, Erik Price wrote:

> Date: Tue, 14 Jan 2003 10:11:32 -0500
> From: Erik Price <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: jsp versus xml syntax
>
>
>
> Noel J. Bergman wrote:
> >>Do yourself a favor and skip learning the XML syntax.  It's for tools, not
> >>people.
> >
> >
> > Oh, I would argue that considerably.  In fact I did.  That is no longer true
> > in JSP v2.0.
> >
> > It is absolutely an absurdity to treat <jsp:action|custom-tag> differently
> > from <jsp:expression|declaration|scriptlet|directive>.  It is also also
> > ridiculous to require users to remember which obscure character (@%!=) means
> > what behavior.
> >
> > That is the short version.  The argument presented to Sun a year or so back
> > was considerably longer.
>
> So then what is the deal?  A former post had me finally nodding my head
> in understanding that in JSPs, "use only JSP syntax, because you can't
> mix the two" but then this one raises the good point that "aren't
> <jsp:useBean> tags and custom tags XML syntax?" and they are allowed.
>
> So for the record, what is allowed and what isn't?  Sorry that I am so
> confused about this.
>

To get the whole answer, you need to download and read the JSP spec.

  http://java.sun.com/products/jsp/download.html

The short answer:  In JSP 1.x you cannot mix the two syntaxes -- period.
Custom tags are expressed in "sort of" XML syntax (but without the
standard namespace declarations.  If you use the XML syntax, you also need
to be prepared to put CDATA blocks around all your code inside things like
<jsp:expression>.

I haven't reviewed what JSP 2.0 came up with as their final answer, but my
recollection is that they were focused primarily on improving the
usability of the XML syntax, but not on allowing mixing.  Need to review
the Proposed Final Draft.

I stand by my statement that it's a waste of effort for a user (especially
a newbie) to take the time to learn both syntaxes.

>
> Thanks
>
>
> Erik

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to