jndi-taglib and scripting variables
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? Iikku - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jndi-taglib and scripting variables
On Thu, 26 Jul 2007, Kris Schneider wrote: Try: filter='%= uid= + userid %' In other words, the scriptlet expression must appear by itself. Thank you! It worked and wouldn't ever crossed my mind, though I spent hours on this. Iikku - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI-taglib search tag returns null
On Wed, 25 Jul 2007, Henri Yandell wrote: On 7/24/07, Iikku Mattila [EMAIL PROTECTED] wrote: jndi:search id=baz contextRef=test filter=uid=pohjus searchScope=subtree /jndi:search This seems a tad silly to me and took quite a few hours to come up with. Well, works now! Which server/server-version are you running it on? Sun Java System Application Server Platform Edition 9.0_01 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI-taglib search tag returns null
I finally figured it out but only with good luck. On Tue, 24 Jul 2007, Kris Schneider wrote: On 7/24/07, Iikku Mattila [EMAIL PROTECTED] wrote: jndi:search id=baz contextRef=test filter=uid=quux searchScope=subtree/ Seems like it might be a filter thing. Try filter=(uid=quux). Tried that, didn't help. What did help was creating an explicit end tag. jndi:search id=baz contextRef=test filter=uid=pohjus searchScope=subtree /jndi:search This seems a tad silly to me and took quite a few hours to come up with. Well, works now! Iikku - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI-taglib search tag returns null
I have problems with the search tag from the JNDI-taglib. The following bit works: jndi:useDirContext id=test url=java:comp/env/ldap/portal / jndi:lookup id=foo contextRef=test name=uid=quux, ou=Staff / jndi:forEachAttribute ref=foo id=bar %=bar% br/ /jndi:forEachAttribute I neatly get all the stored information. However, when I try for example jndi:search id=baz contextRef=test filter=uid=quux searchScope=subtree/ baz ends up being null. I've tried adding values to 'attributes', different searchScopes, looking up different contexts for use, etc. What am I missing? Iikku - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]