You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick McFarlane <PM...@lendx.com> on 2000/12/13 00:43:02 UTC

Tomcat 4.0 milestone 4 and jsp:expression tag

Hello,

 I'm trying to use Tomcat 4.0 milestone 4 to take advantage of it's support
for XML compliant JSP tags. I understand from the New Spec document that
this functionality is not complete (medium rare if I recall). To that
effect, I've noticed some strange behavior when evaluating jsp:expression
tags. It seems that if the jsp:expression tag is embedded in an attribute,
(i.e. <input
value="<jsp:expression>TestBean.getTestString()</jsp:expression>" width=35
height=1/> ) then the jsp:expression tag is not recognized. I'm not sure if
this is a known issue/bug or some sort of user error. I've attached some
samples of the behavior I'm describing. There is attached a bean called
TestBean, a jsp page called TestJsp.jsp which uses the non XML convention
(<% %>) and works properly and a jsp page called TextXMLJsp.jsp which uses
the XML compliant jsp:expression syntax and does not behave properly.

Thanks in advance for looking at this...

	patrick

patrick mcfarlane
sr. java engineer 
lendx
pmcfarlane@lendx.com


Re: Tomcat 4.0 milestone 4 and jsp:expression tag

Posted by Pierre Delisle <pi...@sun.com>.
Also, you should use the nightly build of tomcat-4.0. I don't think that
request-time
expressions were properly supported in m4.

    -- Pierre

Pierre Delisle wrote:
> 
> In XML syntax, a request-time attribute is specified via the following
> syntax:
> 
>    %= ... %
> 
> Here are some snippets of interest from the JSP1.2 PFD spec:
> 
> 5.1.8 Request-Time Attributes
> An action element that can accept a request time attribute (Section
> 2.13.1) can accept an
> argument for that attribute of the form “%= text %” (white space around
> text is not needed,
> and note the missing ‘<‘ and ‘>’). The text, after any applicable
> quoting as in any other
> XML document, is an expression to be evaluated as in Section 2.13.1.
> 
> ...
> 
> 5.2.8 Request-Time Attribute Expressions
> Request-time attribute expressions are of the form “<%= expression %>”.
> Although this
> syntax is consistent with the syntax used elsewhere in a JSP page, it is
> not a legal XML
> syntax. The XML mapping for these expressions is into values of the form
> “%= expression’
> %”, where the JSP specification quoting convention has been converted to
> the XML quoting
> convention.
> 
>     -- Pierre
> 
> Patrick McFarlane wrote:
> >
> > Hello,
> >
> >  I'm trying to use Tomcat 4.0 milestone 4 to take advantage of it's support
> > for XML compliant JSP tags. I understand from the New Spec document that
> > this functionality is not complete (medium rare if I recall). To that
> > effect, I've noticed some strange behavior when evaluating jsp:expression
> > tags. It seems that if the jsp:expression tag is embedded in an attribute,
> > (i.e. <input
> > value="<jsp:expression>TestBean.getTestString()</jsp:expression>" width=35
> > height=1/> ) then the jsp:expression tag is not recognized. I'm not sure if
> > this is a known issue/bug or some sort of user error. I've attached some
> > samples of the behavior I'm describing. There is attached a bean called
> > TestBean, a jsp page called TestJsp.jsp which uses the non XML convention
> > (<% %>) and works properly and a jsp page called TextXMLJsp.jsp which uses
> > the XML compliant jsp:expression syntax and does not behave properly.
> >
> > Thanks in advance for looking at this...
> >
> >         patrick
> >
> > patrick mcfarlane
> > sr. java engineer
> > lendx
> > pmcfarlane@lendx.com

Re: Tomcat 4.0 milestone 4 and jsp:expression tag

Posted by Pierre Delisle <pi...@sun.com>.
In XML syntax, a request-time attribute is specified via the following
syntax:

   %= ... %

Here are some snippets of interest from the JSP1.2 PFD spec:

5.1.8 Request-Time Attributes
An action element that can accept a request time attribute (Section
2.13.1) can accept an
argument for that attribute of the form “%= text %” (white space around
text is not needed,
and note the missing ‘<‘ and ‘>’). The text, after any applicable
quoting as in any other
XML document, is an expression to be evaluated as in Section 2.13.1.

...

5.2.8 Request-Time Attribute Expressions
Request-time attribute expressions are of the form “<%= expression %>”.
Although this
syntax is consistent with the syntax used elsewhere in a JSP page, it is
not a legal XML
syntax. The XML mapping for these expressions is into values of the form
“%= expression’
%”, where the JSP specification quoting convention has been converted to
the XML quoting
convention.

    -- Pierre

Patrick McFarlane wrote:
> 
> Hello,
> 
>  I'm trying to use Tomcat 4.0 milestone 4 to take advantage of it's support
> for XML compliant JSP tags. I understand from the New Spec document that
> this functionality is not complete (medium rare if I recall). To that
> effect, I've noticed some strange behavior when evaluating jsp:expression
> tags. It seems that if the jsp:expression tag is embedded in an attribute,
> (i.e. <input
> value="<jsp:expression>TestBean.getTestString()</jsp:expression>" width=35
> height=1/> ) then the jsp:expression tag is not recognized. I'm not sure if
> this is a known issue/bug or some sort of user error. I've attached some
> samples of the behavior I'm describing. There is attached a bean called
> TestBean, a jsp page called TestJsp.jsp which uses the non XML convention
> (<% %>) and works properly and a jsp page called TextXMLJsp.jsp which uses
> the XML compliant jsp:expression syntax and does not behave properly.
> 
> Thanks in advance for looking at this...
> 
>         patrick
> 
> patrick mcfarlane
> sr. java engineer
> lendx
> pmcfarlane@lendx.com