Re: Output and JSTL

Max <maxxam-cuDQgYkrLFxfAa1EqD/[email protected]>
Newsgroups gmane.comp.java.keel.devel
Message-ID <[email protected]>
I have been able to get basic jstl support running by doing the following:

   1. Adding dependencies to jstl.jar and standard.jar to the POM - as
      Pierre I think it was explained elsewhere.
   2. Adding c.tld to the keel-build/webapps/struts-1.2.4/WEB-INF directory.
   3. Including <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> in my jsp
      file.

I can access the outputs using an array reference (or loop) as follows:

  <c:forEach var="output" items="${outputs}">
        <p><c:out value="${output.map['name']}" default=""/> = <c:out 
value="${output.map['content']}" default=""/> </p>
  </c:forEach>

and individually using:

    <c:out value="${outputs[0].map['name']}" default=""/>

*Problem1:*

However I am having difficulty in accessing the outputs by name. From 
the OutputsInMaverickJSTL Wiki it says that named outputs can be 
accessed using something like:

    <c:out value="${model.myoutput.map['content']}" default=""/>

This does not work and neither does:

    <c:out value="${myoutput.map['content']}" default=""/>

I looked at the code in StrutsClientConnector where I think the response 
elements are added to the DynaBean, but I cannot see where the elements 
are added by name. Also as they are added as an array and not as a Map 
so the elements cannot be referenced using something like 
outputs['myoutput']. I seem to remember doing this in Expresso.

Shash, is this the right way of doing it, or is this the stuff that you 
are going to be working on that you mention in your post?

*Problem 2:

*I'm also having difficulty in referencing an Output nested within an 
Output by name using the struts tags. Does someone have an example of 
this please.

Max.


> Pierre,
>
>> Hello,
>>
>> Does anybody use the JSTL core tags in JSP with Outputs (and the 
>> Output ResponseElements)?
>>
>> I didn't find the right way to deal with them in tests or loop (c:if 
>> & c:forEach) using EL, even with the help of OutputsInMaverickJSTL Wiki.
>>
>> Regards
>>
>> Pierre
>>
> As in my last post, this is currently broken since keel-client was 
> restructured a few months back.  Basically, only the Struts (and 
> Cocoon, via XML) can deal with "dyna" beans, which Outputs are. As 
> soon as the Maven integration settles out a bit, and I have a sensible 
> workspace back again :-), I'll work on either resurrecting the old 
> support, or, better yet, trying to take advantage of the standard 
> java-bean support which ahs been added.
>
> Shash
>
> http://keelframework.org/documentation.shtml
> Keelgroup mailing list
> [email protected]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
>
>
>

http://keelframework.org/documentation.shtml
Keelgroup mailing list
[email protected]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.