Hi!!!!!
There is a very simple solution to this.
Have one function for executing the query and gettin the result in the
resultset.Then have another function to fetch the result one by one and
putiing thm in the elements or variables of the bean and  in the jsp page
run a while loop this this (2nd function) does not return a false get the
values of the elements using get method in simple bean case (dunno about
EJB).
And hence this solves ur problem.




"Corey A. Johnson" <[EMAIL PROTECTED]> on 07/06/2000 06:53:51 PM

Please respond to A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)

Subject:  Returning java.sql.ResultSet from an EJB




Morning!

Quick question... I am invoking a method in an EJB from a JSP...  the
method in the EJB performs a SQL query...  Is it possible to return the
java.sql.ResultSet object to my JSP?  So i can then loop through the
records in the JSP and build the results HTML table?  I tried this and i
keep getting an IDL error telling me that the return type
"java.sql.ResultSet" is not allow...

if i can't.. does anyone have any code examples or suggestions? Or am i
missing something?

i guess i could place the data from each field into an element of a
String array... and then place each String array.... which would
represent a row in the SQL ResultSet.. in a Vector... and then return
the Vector to the JSP and use an Enumeration to loop through the String
Arrays....  does that make sense?  Or can it be done in a simpler
fashion?

Thanks in advance.

Cj
--
Corey A. Johnson
Creative Network Innovations, Inc.
1-800-264-5547 ** 1-407-259-1984

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to