You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Carlos Barroso <es...@ptinovacao.pt> on 2002/09/05 14:08:50 UTC
Problem using scripting variable from ...
Hy guys.
I'm having a problem trying to use the scripting variable created by the
<xtags:variable ... /> tag.
The code below is a simple "if" that tests the parameter "menu" passed to
the JSP is "null". If it is, I try to get the first
OBJECT element under the APPLICATION element with the attribute value of
"managment". Here's a snippet from
my XML document:
<SIGNON>
<APPLICATION name='managment'>
<OBJECT name='obj1'/>
<OBJECT name='obj2'/>
</APPLICATION>
</SIGNON>
"permissions" is a variable of type "String" that contains a XML document
like the one above.
Here's the code:
<%
if(request.getParameter("menu") == null) {
%>
<xtags:variable id="aux" context="<% permissions %>"
select="SIGNON/APPLICATION[@name=managment]/OBJECT[1]/@name"/>
<%
response.sendRedirect("managment.jsp?menu=" + aux);
}
%>
Every time I execute this code, the "aux" variable is allways empty!? Why? I
don't understand...
Can someone help me please.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>