Hi,
 
I'm testing s:iterator and s:url tags vs #foreach and #surl velocity
tags, and my surprise is that Struts s:url tag is "slower" than #surl
invocation. When I work with Velocity, the test page is rendered
immediately, but when I execute the same test (in the same machine and
Tomcat) with s:url, an annoying scroll effect appears.
 
The code I'm testing is (offers is an ArrayList of very light POJOs):
 
* taglibs
 
 <s:iterator value="offers">
  <tr>
   <td>
    <s:url id="offUrl" action="Redirect">
     <s:param name="url"><s:property value="url"/></s:param>
    </s:url>
    <s:a href="%{offUrl}"><s:property value="title"/></s:a>
   </td>
  </tr>
 </s:iterator>
 
* Velocity
 
 #foreach($offer in $offers)
  <tr>
   <td>
    #surl("id=offUrl" "action=Redirect" "url=$offer.url")
    <a href="${offUrl}">$offer.title</a>
   </td>
  </tr>
 #end

What's the matter? What I'm doing wrong? I'm using Struts 2.0.6.
 
Thanks a lot in advance!
 
Cheers

Reply via email to