tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Barroso <est-c-barr...@ptinovacao.pt>
Subject RE: How to get a <xtags:valueOf.../> value
Date Wed, 21 Aug 2002 15:02:27 GMT
if <xtags:variable id="menu" select="<xpath expression>"/> really exposes
the menu as a scripting variable then why is it giving the following error:

	Undefined variable: menu

in the following example:

<%
  System.out.println(menu);
%>

Can someone help please. This is givig me a headache.   :-(



-----Original Message-----
From: Shawn Bayern [mailto:bayern@essentially.net]
Sent: quarta-feira, 21 de Agosto de 2002 14:31
To: Tag Libraries Users List
Subject: Re: How to get a <xtags:valueOf.../> value


Right - if <xtags:variable> has an 'id' attribute, then you may simply use
it to expose a scripting variable.  There isn't a need for <jsp:useBean>
if the tag directly exposes a scripting variable.  (So that's your
answer!)

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com

On Wed, 21 Aug 2002, Carlos Barroso wrote:

> I tried another approach:
> 
> <xtags:variable id="menu" select="<xpath expression>"/>
> <jsp:useBean id="menu" type="String"/>
> 
> and it didn't work again...
> 
> At the begining of the file i have:
> 
> 	String menu = null;
> 
> and using the lines above it gives the following error:
> 
> 	Variable 'menu' is already defined in this method.
> 
> It's kind of weird...
> 
> 
> 
> -----Original Message-----
> From: Shawn Bayern [mailto:bayern@essentially.net]
> Sent: quarta-feira, 21 de Agosto de 2002 14:06
> To: Tag Libraries Users List
> Subject: RE: How to get a <xtags:valueOf.../> value
> 
> 
> On Wed, 21 Aug 2002, Carlos Barroso wrote:
> 
> > Thanks very much for the help. Where can i get JSTL to work with xtags?
> 
> You can download our JSTL implementation from
> 
>   http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/
> 
> Then, once you follow the instructions in the package to install JSTL into
> your web application, simply include
> 
>  <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> 
> at the top of your page in addition to the XTags <%@ taglib %>
> declaration.  Once you do that, you'll be able to use the syntax I
> suggested.
> 
> Note that JSTL provides an XML-manipulation tag library; you might
> consider using that instead of XTags.  (Note that JSTL requires a JSP 1.2
> container, while XTags continues to run successfully on the old JSP 1.1.)
> One advantage of switching to JSTL is that you can be sure the tags are
> supported on every container, and individual containers can recognize the
> tags and optimize their implementations.
> 
> 


--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message