2 for-loops in JSP or Struts?

P

peter10

Hi there,

can anybody help to translate the following Java-code into JSP or
Struts syntax, so that the JSP-page doesnt contain Java code? I
experimented with Strut's <iterate> tag but that didn't seem to help
with the second for-loop ...

Any help would be greatly appreciated!

Best wishes,
Peter


ArrayList array = new ArrayList(collection1);
ArrayList array2 = new ArrayList(collection2);

for(int i = 0; i < array.size(); i++){
out.println(array.get(i));
if(array.get(i) == value_from_request){
for(int j = 0; j < array2.size(); j++){
out.println(array2.get(j));
}
}
}
 
R

Rogue Chameleon

peter10 said:
Hi there,

can anybody help to translate the following Java-code into JSP or
Struts syntax, so that the JSP-page doesnt contain Java code? I
experimented with Strut's <iterate> tag but that didn't seem to help
with the second for-loop ...

Why don't you start with showing us your "experimentation" and we'll go
from there. No one here is going to give you the answer. However, we
will all help you get to the answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top