JSP to output Java String Array

Joined
Mar 31, 2008
Messages
1
Reaction score
0
Hi everyone,

I have a question regarding String Arrays and jsp output to html table:

Lets say I have the following output stored in a String Array:

String[] arr = new String[BookName,Date,Publisher,Rating,Author,Availability];

The six elements of this array get populated with data from an Access database. JSP doesnt have a problem accessing the array.
When I try to print the data from the array in html table format this is the output I always get:

book1 - this would be the BookName column
1/2/3 - the Date column
somename - the publishers column
3 - the rating column
vassil - the publisher column
Yes - the availability column
book2
1/2/3
somename
3
vassil
Yes and etc...

My question is how do I format this array to print in html table format in the following way.

i.e.:

book1 1/2/3 somename 3 vassil Yes
book2 1/2/3 somename 3 vassil Yes
book3 1/2/3 somename 3 vassil Yes
book4 1/2/3 somename 3 vassil Yes
book5 1/2/3 somename 3 vassil Yes
book6 1/2/3 somename 3 vassil Yes

Thank you.

Any help will be greatly appreaciated.

Regards,

Irena V.
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top