tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gideon, Thomas" <Thomas.Gid...@B2eMarkets.com>
Subject RE: Word Separator Character For Bean Key Names...
Date Thu, 12 Dec 2002 19:47:57 GMT
Just for a lark, did you try doing something like:

<c:set var="employee"
	value="${sessionScope['com.abc.fleetsystems.employee']}"/>
<c:out value="${employee.lastName}"/>

to see if that worked?

> -----Original Message-----
> From: Hohlen, John [mailto:JHohlen@erac.com]
> Sent: Thursday, December 12, 2002 2:13 PM
> To: 'Tag Libraries Users List'
> Subject: RE: Word Separator Character For Bean Key Names...
> 
> 
> Follow-Up Question:
> 
> If I want access a property from the bean, such as lastName, 
> what's the
> syntax?  I tried a few different things such as: 
> 
> ${sessionScope["com.abc.fleetsystems.employee"].lastName}
> 
> But it didn't work.  Thanks, JOHN
> 
> -----Original Message-----
> From: Shawn Bayern [mailto:bayern@essentially.net]
> Sent: Thursday, December 12, 2002 10:09 AM
> To: Tag Libraries Users List
> Subject: Re: Word Separator Character For Bean Key Names...
> 
> 
> On Thu, 12 Dec 2002, Hohlen, John wrote:
> 
> > But this won't work with the EL syntax, right?  For example:
> > 
> > ${sessionScope.com.abc.fleetsystems.employee}
> > 
> > Won't JSTL the Expression Language (EL) evaluator get 
> confused and look
> > for nested objects? More specifically:
> >  
> >   getCom().getAbc().getFleetsystems().getEmployee()
> > 
> > Hence, I wondering what the standard word separator, or in our case,
> > package separator character is.  I'm guessing that it's an 
> underscore, but
> > haven't seen any such recommendation.
> 
> You must use the [] operator, as in
> 
>   ${sessionScope["com.abc.fleetsystems.employee"]}
> 
> -- 
> Shawn Bayern
> "JSTL in Action"   http://www.manning.com/bayern
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:taglibs-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:taglibs-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message