It's not a secret anymore!
The moose likes JSP and the fly likes multiple array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "multiple array" Watch "multiple array" New topic

multiple array

supriya lal

Joined: Sep 11, 2012
Posts: 15

how to print multiple arraylist simultaneously...this code is not giving the right result..
I want the output as PRODUCT PRICE

but I am getting the output as PRODUCT PRODUCT

Swastik Dey

Joined: Jan 08, 2009
Posts: 1584

First of all, avoid java code inside jsp, it's a very old practice. Use jstl/custom tags etc. Now coming to your question, the table tag should come before the loop, its creating the table every time, in addition to this you seem to have an extra td tag.

James X Peterson
Whizlabs Java Support
Ranch Hand

Joined: Feb 26, 2013
Posts: 158
Hi supriya lal,

there is and extra TD tag remove it. try to place the table tag above the loop as it is creating the table for every iteration. Try to change these changes in your code and see the result.

I agree. Here's the link:
subject: multiple array
It's not a secret anymore!