I guess one thing that might help a tiny bit is if there was a map in some scope that is formed by merging (in order) the applicationScope, sessionScope, requestScope, and pageScope maps. That would give you a single map to search, instead of having to know which scope to look in.
> -----Original Message----- > From: Steve Raeburn [mailto:[EMAIL PROTECTED] > > Thanks, but that's not what I'm trying to accomplish. > > It's very common to place beans into session or application scopes with > names such as "org.apache.struts.action.ACTION_MESSAGE". This is similar > to > the Java package naming convention and accomplishes the same purpose of > avoiding name collisions. > > In order to access the bean, you need to be able to specify a dotted name, > but you might not always know in which scope it will be found. Hence the > need to be able to specify a dotted bean name in EL. > > The problem is that either EL interprets the string as a path to a nested > property or, if you escape the string, as a literal string. > > Ultimately, I need to be able to access the > PageContext.findAttribute(java.lang.String name) method using EL, but as > this method does not meet bean property naming conventions I can't even do > something like ${pageContext["dotted.name"]}. > > I had a look through the JSTL 1.0 and JSP 2.0 specs last night and this > case > just does not seem to be addressed. As this is a very common requirement, > I'm surprised that it's not covered. > > Steve > > > > -----Original Message----- > > From: Daniel Montero [mailto:[EMAIL PROTECTED] > > Sent: June 5, 2003 10:24 AM > > To: Tag Libraries Users List; [EMAIL PROTECTED] > > Subject: Re: Accessing scope attributes with dotted names using JSTL > > > > > > You could access a variable as ${mydomain.mybean} if you created a bean > > "mydomain" (Hashtable, for example), and set any attributes you > > want there. > > > > <% > > Hashtable mydomainVar = new Hashtable(); > > String mybeanVariable="this is a test"; > > mydomainVar.put("mybean", mybeanVariable); > > request.setAttribute("mydomain", mydomainVar); > > %> > > <c:out value="${mydomain.mybean}"/> > > > > > > HTH, > > danim > > > > > > > > ----- Original Message ----- > > From: "Steve Raeburn" <[EMAIL PROTECTED]> > > To: "Tag Libraries Users List" <[EMAIL PROTECTED]> > > Sent: Wednesday, June 04, 2003 11:12 AM > > Subject: RE: Accessing scope attributes with dotted names using JSTL > > > > > > > Thanks, that works. You're a star! > > > > > > Now, a follow up ... :-) > > > > > > Is there any way to do it without specifying the scope? > > > As in <c:out value="${\"mydomain.mybean\""} (which doesn't work). > > > > > > Steve > > > > > > > -----Original Message----- > > > > From: Bruce Perry [mailto:[EMAIL PROTECTED] > > > > Sent: June 4, 2003 2:42 AM > > > > To: Tag Libraries Users List > > > > Subject: Re: Accessing scope attributes with dotted names using JSTL > > > > > > > > > > > > Try this: > > > > > > > > > <c:out value="${requestScope[\"mydomain.mybean\"]"} /> > > > > > > > > "requestScope" is an EL implicit object. > > > > > > > > Bruce > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]