tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcoll...@point2.com (Collins, Jason)
Subject RE: Scriptlet expressions in custom JSP tags
Date Fri, 07 Apr 2000 21:23:07 GMT

I just tried to use your approach Danno.

The second one worked (i.e., using single quote to delimit the attribute value); the first
one did not work (i.e., using
the double quote to delimit the attribute value).

Anil, I will use this approach as a work around.

Thanks,
j

-----Original Message-----
From: Danno Ferrin [mailto:shemnon@earthlink.net]
Sent: April 7, 2000 3.05p
To: tomcat-user@jakarta.apache.org
Subject: Re: Scriptlet expressions in custom JSP tags


I believe the spec is clear on this, I just don't have the time to
substantiate my arguments with chapter and verse.  Basically action tag
attributes are either entirely a request time attribute or entirely a
string.  The working code could look like

<p2:a href="<%="foo.html?pk=" + pk.toString()%>">Link</p2:a>

or

<p2:a href='<%="foo.html?pk=" + pk.toString()%>'>Link</p2:a>

to be less confusing about the quoting (both _should_ be legal).

--Danno

"Anil K. Vijendran" wrote:
>
> Hi Jason,
>
> I was just talking to Mandar <mandar@eng.sun.com> who's trying to fix it. You have
run into an
> interesting case which the spec is not clear about. All the spec says is that an attribute
can
> either be a translation-time value or a value that can be computed at request-time. What
you are
> trying to do is a value that has a part in it which is an expression (or a request-time
value).
>
> I can see this might be useful. What I'd suggest you do is for now find a workaround.
One of us
> can bring this up for discussion in the next version of the JSP spec.
>
> "Collins, Jason" wrote:
>
> > I need to use scriptlet expressions in my custom JSP tags:
> >
> >   <p2:a href="foo.html?pk=<%=pk.toString()%>">Link</p2:a>
> >
> > Is this possible? It doesn't seem to work at all. I have the following entries in
my taglib:
> >
> >   <tag>
> >     <name>a</name>
> >     <tagclass>com.point2.phoenix.web.tag.Anchor</tagclass>
> >     <bodycontent>JSP</bodycontent>
> >     <attribute>
> >         <name>href</name>
> >         <rtexprvalue>true</rtexprvalue>
> >     </attribute>
> >     <attribute>
> >         <name>target</name>
> >         <rtexprvalue>true</rtexprvalue>
> >     </attribute>
> >   </tag>
> >
> > Thanks,
> > j
> > ===========================================================
> > Jason Collins                            Phone 306.955.1855
> > Information Systems Manager                Fax 306.955.0471
> > Point2 Internet Systems                      www.point2.com
> > ===========================================================
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
> --
> Peace, Anil +<:-)
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message