Siva,

anteater is not very close to commons to my knowledge, as sebb pointed out somewhat quickly.

I looked a bit at the documentation and saw they have jelly support as well which provides much of your expectations. The foreach tag, however, seems to be theirs.

So, if you allow, here's a jelly answer, all in jelly namespace, which is quite close to java itself, I suppose this was your intent of posting to this list. This programme reads the lines from "path-to- file" and outputs them to output... you should be able to do something useful out of it provided you can embed this into anteater.

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly xmlns:j="jelly:core">
 <j:new className="java.io.FileReader" var="fIn">
   <j:arg value="path-to-file"/>
 </j:new>
 <j:new className="java.io.LineNumberReader" var="input">
   <j:arg value="${fIn}"/>
 </j:new>

 <j:set var="line" value="${input.readLine()}"/>
 <j:while test="${not(empty(line))}">
 Here is a line: ${line}
 <j:set var="line" value="${input.readLine()}"/>
 </j:while>
</j:jelly>


Here I have only used the core tag-library of jelly... there's a whole lot more you can do with other tag-libraries. The util tag library (see http://commons.apache.org/jelly/libs/util/tags.html and examples at http://svn.apache.org/viewvc/commons/proper/jelly/trunk/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/) might actually do the job easier provided you do not have zillions of URLs.

paul

Le 07-juil.-08 à 22:12, Kadamban, Sivasankari a écrit :

Hi,

I am trying to use anteater for verifying various URLs in our application using foreach.

<target name="verify">
  <httpRequest group="server" path="${url}" method="GET">
      <match>
        <responseCode value="200"/>
      </match>
    </httpRequest>
</target>

<foreach list="url1,url2,url3,url4" target="verify" param="url"> </ foreach>

Is there any way that I can specify the list of URLs in a file and read them through one by one in the "for loop"?

Thanks,
Siva


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to