It's a little hard to follow all your line numbers and A vs. B choices,
but I think your problem boils down to one issue:

If the "name" of a scoped variable in any scope has a period in it, you
will only find it using the form where the variable name is enclosed in
quotes.

That is, if your scoped variable name is "foo.bar", then the following
are NOT equivalent:

 ${applicationScope.foo.bar}
 ${applicationScope["foo.bar"]}

And wrt the mailing list question, the "taglibs-user" list is often
where these issues are discussed, although now with the EL moving into
JSP 2.0, this list may be seeing more of these questions.

> -----Original Message-----
> From: Budi Rostiarso [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 6:47 PM
> To: [EMAIL PROTECTED]
> Subject: rendering element of a Map stored in applicationScope
>
> Hi guys, need help understanding this following issue:
> i want to render value of a Map element with the Map object stored in
> applicationScope. From various reading, i discover a way to do it with
> something like ${object[key]} (for later usage, lets call this syntax
> "A").
>
> Now, for objects stored in page scope, i've tried syntax A above, and
> the result came up valid. But if the object is stored in
> applicationScope, the taglib wouldn't render the value, seems to me
that
> it can't find the object. It can only render correctly after i change
> the syntax using ${applicationScope["objectName"][key]} ( i'll call it
> "B").\
> This is quite confusing for me :)
>
> In line 4, (Please check out my code snippet below), if i use "B",
valid
> result. But using syntax "A", nothing happen, empty result.
> But once the object is copied to pageScope, (right after line 6 using
> struts, or line 10 using jstl) with a new name, the object can be
render
> by using syntax "A" (in line 7 or 11).
>
> Ok, i hope you all understand my problem definition above :)
>
> So, my question is, for Map objects in applicationScope, why does
syntax
> "A" doesn't work, and only syntax "B" gives correct result, while for
> Map objects in pageScope we can do it either way?
>
> Second question, is there any jstl forum/mailing list out there?
>
>
> here goes the jsp snippet:
>
>
------------------------------------------------------------------------
> ---------------
> 1: <bean:write name='fofa.fdc'/><br/>
> <br/>
> 2: <c:out value='${applicationScope.fofa.fdc}'/><br/>
> 3: <c:out value='${applicationScope["fofa.fdc"]}'/><br/>
> <br/>
> 4: <c:out value='${applicationScope["fofa.fdc"]["S"]}'/><br/>
> 5: <c:out value='${applicationScope.fofa.fdc["S"]}'/><br/>
> <br/>
> <bean:define id='fdc' name='fofa.fdc'/>
> 6: <c:out value='${fdc}'/><br/>
> 7: <c:out value='${fdc["S"]}'/><br/>
> <br/>
> <c:set var='cSetFdc' value='${fofa.fdc}'/>
> 8: <c:out value='${cSetFdc}'/><br/>
> 9: <c:out value='${cSetFdc["S"]}'/><br/>
> <br/>
> <c:set var='cSet2Fdc' value='${applicationScope["fofa.fdc"]}'/>
> 10: <c:out value='${cSet2Fdc}'/><br/>
> 11: <c:out value='${cSet2Fdc["S"]}'/><br/>
>
------------------------------------------------------------------------
> ------------
>
> and the html result:
>
> 1: {= , M=Medium, S=Strong, W=Weak}
> 2:
> 3: {= , M=Medium, S=Strong, W=Weak}
> 4: Strong
> 5:
> 6: {= , M=Medium, S=Strong, W=Weak}
> 7: Strong
> 8:
> 9:
> 10: {= , M=Medium, S=Strong, W=Weak}
> 11: Strong
>
>
>
> Thanks in advance
>
>
> .bdR.
>
>
========================================================================
==
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-
> INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to