How can I use a resultset from a remote connection I get with a bean and display this on a JSP table? I am puting the resultset into an array and can put this into a list but I really need it in a table.
I would avoid working directly with the database connection and/or connection from within your JSP.
A common way to do this is to write a bean that represents a single row in your table. Loop through the result set, creating one row bean for each row in the resultset and add it to a List (java.util.ArrayList is commonly used for this). Then bind the list of row beans to request scope and forward to the JSP. From within the JSP you'll be able to use JSTL/EL to loop through the list of rowBeans to present your data as an HTML table.
Could you please give me an example of what the code in the JSP should look like? This is the code generated when I add the Dynamic Table to the page. My array is called faiArray.
In the list of components that I can choose from Dynamic Table is one of them. I wished I was more knowledgable in this area so my posts would not be so sketchy.
When you say "Dynamic Table' do you just mean that you don't know the number and names of the columns in the resultsets returned from your database query or is Dynamic Table the brand name of some third party library that you're using?
I am using Websphere Development Studio. The term Dynamic Table is the name on the component listed in the set of tools. I an earlier post it was suggested to use ArrayList and then a nested set of c:forEach tags. Can you tell me how to do the nesting so the contents of list one is in column one and list two is in column two etc?
We have an IBM Web sphere forum where you are more likely to find some help with their proprietary objects. I'll move this discussion over there.
If, you can get help getting the data into the nested lists or arrays but still need help with the JSTL tags, either ask the moderator there to move it back here or start a new topic here.