Re: jndi-taglib and scripting variables

"Kris Schneider" <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <[email protected]>
On 7/26/07, Iikku Mattila <[email protected]> wrote:
> Hi all,
>
> I have a portal with a jsp channel in which I use the jndi-taglib. I'm
> trying to do a ldap-search with the portal user's userid. I get the id
> from elsewhere and both
>
> <jx:expr value="$userid" />   and
> <%=userid%>
>
> print it out just nice. However, when I try
>
> <jndi:search id="searchResult" contextRef="ldapContext"
> filter="uid=<%=userid%>" searchScope="subtree" >
> </jndi:search>
>
> or filter="uid=<jx:expr value="$userid" />" things don't work the way they
> should. With <jx:expr> it says
>
> com.sun.portal.providers.jsp.jasper3.jasper.compiler.ParseException:
> /etc/opt/SUNWps/desktop/*/*/content.jsp(31,91) Attribute
> $userid has no value
>
> and with <%=userid%> I just get an empty searchResult. It surely must be
> possible to give the id as a parameter to the filter somehow? Any ideas?

Try: filter='<%= "uid=" + userid %>'

In other words, the scriptlet expression must appear by itself.

> Iikku

-- 
Kris Schneider <mailto:[email protected]>
directThought  <http://www.directThought.com/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.