Announcement Announcement Module
Collapse
No announcement yet.
Displaying generic result sets on jsp ? {newbie} Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Displaying generic result sets on jsp ? {newbie}

    Hi,

    I am new to Spring and would appreciate your advice on how I plan to implement a webapp with JDBC functionality.

    What I would like to do is call a stored procedure and then create the resultset as a html table in a jsp. using the spring mvc and most likely the abstractwizardcontroller.

    What I understand so far is this can be done by using my controller to call a class extending StoredProcedure. The stroed procedure extension class will contain the proc call. This is reasonably straightforward to do with a rowmapper and accessing the fields of the object using a forEach loop and calling object.field and then using calls to out to send it to screen using the following:-


    <spring:bind path="messages.results">
    <c:forEach var="message" items="${messages.results}">
    <tr>
    <td><c:out value="${message.name}"/></td>

    Does anyone know if you can generically do this and avoid having to create concreate objects in the rowmapper ? Is it possible to create and pass on generic result sets and somehow create the tables on the fly by doing something like a nested loop one for the resultset items and one for row items ?

    I would appreciate any assitance you can provide.

    Cheers.

    A
Working...
X