Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Implementing a for circle with Struts custom tag

Posted on 2004-04-29
3
Medium Priority
?
462 Views
Last Modified: 2013-11-24
Is possibile implement a circle For with Struts custom tag Or I must use the JSTL core library?

Thanks
0
Comment
Question by:MissBrucoMela
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:searlas
ID: 10948940
Do you want to do the equivalent of for (int i =0; i < 10; i++) { ... }
Or, are you trying to iterate over a collection/array?

If you actually have something to iterate over, use the logic:iterate tag:
http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate
0
 

Author Comment

by:MissBrucoMela
ID: 10949074
I want to do something like :

for (int i =0; i < 10; i++) { ... }
 
and not use logic: iterate tag. Is it possible? If not possibile, how can I do this using the Iterate tag?
0
 
LVL 7

Accepted Solution

by:
searlas earned 375 total points
ID: 10949179
No, Struts doesn't support this.  Struts tags always involve a resource of some kind (bean/parameter/message/cookie), they do not attempt to encapsulate logic such as independent for loops.

JSTL would be the appropriate solution.

From the spec:

<c:forEach var="i" begin="0" end="10">
<c:out value="${i}"/>
</c:forEach>


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question