I have a page that has the following code hard coded into it:
<java>
HashMap hm = new HashMap(27);
hm.put("amazon","
http://www.amazon.com/exec/obidos/redirect?tag=calphalon&path=tg/browse/-/291359"); hm.put("bedbathandbeyond","
http://www.bedbathandbeyond.com/stylePage.asp?order_num=-1&RN=165"); hm.put("cooking","
http://www.cooking.com/products/themepages/themefocus.asp?ThemeNo=0106"); hm.put("lnt","
http://www.lnt.com/entry.point?target=152C6E&source=VL_LG:2506
GR:74:1:803:LNT"); hm.put("macys","
http://www.macys.com/catalog/index.ognc?CategoryID=7611&LinkType=EverGreen"); hm.put("williams-sonoma","
http://ww2.williams-sonoma.com/srch/name.cfm?imgs=1&src=catcckwb%7Cp1%7Crshop%2Fhme%2Fhme&rootcat=shop&nameform=1&words=calphalon"); //read in and randomize stores
String[] stores = {"amazon","bedbathandbeyond","cooking","lnt","macys","williams-sonoma"};
Vector storeVector = new Vector();
for( int i=0; i<stores.length; i++ ) {
storeVector.add( stores
);
}
for( int i=0; storeVector.size()>0; i++ ) {
int random = (int) (Math.random() * storeVector.size());
stores = (String) storeVector.elementAt(random);
storeVector.remove( storeVector.elementAt(random) );
}
request.setParameter("hm",hm);
request.setParameter("stores",stores);
</java>
I'm looking to try and replace the values in the String[] stores={"a","b","c","d","e"} with the contents of a replicant area item from a DCR. My question is whether or not the <iw_perl> tags will work inside of the <java> tags or if I'm better off going with <iw_perl> tags only and printing out all of the lines for the <java> section as well.
Also, if you have any suggestion for this, please feel free to share them. My plan is to iterate through the replicant area, and set the value of a particular field into an array. Then once the iterations are complete, print out the text and the values from the array.
Thanks in advance for any help.