Are you sure you downloaded the implementation from apache's site? Are you sure you have the .TLDs located in your WEB-INF dir? Are you sure you have the taglibs referenced in your web.xml ?
From: "Jitesh Sinha" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: RE: Newbie:Using two arrays in a <logic:iterate> tag Date: Tue, 5 Aug 2003 02:01:52 +0530
But Kris,when I tried to use JSTL for another requirement by using taglib uri as <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> i get the error that this taglib cannot be located. I am not able to even see the page "http://java.sun.com/jstl/core" through browser .Browser shows me 'File not found' . What can be the reason????
-----Original Message----- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 1:52 AM To: Struts Users Mailing List Subject: Re: Newbie:Using two arrays in a <logic:iterate> tag
JSTL is your friend:
<c:forEach var="item" items="${anArray}" varStatus="i"> <c:out value="${item}"/> <c:out value="${anotherArray[i.index]}"/> </c:forEach>
Assuming "anArray" and "anotherArray" are scoped attributes...
Quoting Jitesh Sinha <[EMAIL PROTECTED]>:
> How do you access the elements of an array inside <logic:iterate> tag which > takes the collection as another array . I am sure that the length of the > two > arrays are same. > In other word how do you substitute the following Java code in Struts : > > String[] anArray = myBean.getAnArray() ; > String[] anotherArray = myBean.getAnotherArray() ; > for(int i = 0 ; i < anArray.length ; i++) > { > out.print(anArray[i]) ; > out.print(anotherArray[i]) ; > } > > I want to use only one logic:iterate tag.Is that possible? > > Thanks, > Jitesh
-- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]