Solved

Implementing a for circle with Struts custom tag

Posted on 2004-04-29
3
460 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 125 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

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 186
looking for unix program to search some keywords in side EAR WAR and JAR files 10 122
custom annotations 9 51
JVM error from eclipse 1 27
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.
Suggested Courses

751 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