1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

JSP to mainframe DB2--global connection?

Discussion in 'JSP' started by mhb22079, Jul 9, 2010.

  1. mhb22079

    mhb22079 New Member

    Joined:
    Jul 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello:

    I've built some JSP pages on my corporate Tomcat server that successfully attach to DB2 however the performance is pretty bad. I'm using JDBC. I believe it is related to opening and closing the connection multiple times but am unsure how to proceed.

    My site uses 3 vertical frames (header, menu, and content pages) accepts several fields from a user and executes a DB2 query based on the data entered. A submit button calls the same JSP and displays the result of the query.

    The issue I am having is that it seems that on each load of the JSP the connection seems to be automatically closed. If I open the connection on the first load of the JSP (when called from menu) and don't close it, on the query when the page is called again I get a Null pointer exception.

    Sorry to be so wordy but I'm a mainframe programmer and pretty new to the workings of JSP and database connections. I would greatly appreciate any guidance as the best means to handle a database connection that would span multiple JSP pages (or the same JSP called to return results).

    Thanks!
     

Share This Page