• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying Multiple values Returned from a Stored Procedure using JSTL

 
LaTeef Lusk
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stored procedure that can return up to 10 values. Is there a way to use jstl to go through the values to see if there is a match to a predefined variable.

As an example. The SP returns 3 types of fruit
Orange
Banana
Apple


I have a variable defined as FruitA = 'Apple'. I want to take the value of the stored procedure and assign it to variable defined as FruitB. Then I want to compare the 2 and if they match then display some text.

Here is my code but it only returns the first value that the stored procedure returns:

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65520
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because resultsets are not suitable for use in a JSP. In your Java code, collect the resultset values into a Java collection for passing to the JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!