On 10/11/2013 01:21 PM, Paul B. Henson wrote:
> No, I meant the post containing the underlying jsp code that generated it:
> 
> <c:forEach var="attr" items="${auth.principal.attributes}" >
>         
> <cas:${fn:escapeXml(attr.key)}>${fn:escapeXml(attr.value)}</cas:${fn:escapeXml(attr.key)}>
> </c:forEach>
> 
> This code does appear to generate one entry for each attribute, containing 
> whatever attr.value is. My curiosity is whether the attr.value variable is a 
> collection at this point in the jsp, and the escapeXml call is what is 
> flattening it (in which case the jsp could potentially be modified to detect 
> it is a collection and do an additional foreach to break them out separately) 
> or if the variable attr.value is already flattened by the time the jsp sees 
> it, in which case it would need to be fixed somewhere else.

CAS code looks to have instances of:

  Map<String, List<Object>>

The List parent class AbstractCollection implements .toString():

http://docs.oracle.com/javase/1.5.0/docs/api/java/util/AbstractCollection.html#toString%28%29

which says, "... string representation consists of a list of the
collection's elements in the order they are returned by its iterator,
enclosed in square brackets ("[]"). Adjacent elements are separated by
the characters ", " (comma and space)."

So I think it's the EL .value operator making the conversion. As Marvin
suggested, it'd need an inner loop to print individual elements.

Tom.

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to