2002 JI Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: mubasyir ahmad anwar - mubasyir datasource..? 2003-08-05 20:35 I'm running the webapp example with datasource.. But can anybody explain me what is the different between datasource under WEB-INF/classes and datasource under samples directory.. because If i want to change one records,.i only change it in datasource under WEB-INF... And which datasource that <%@ page import="datasource.*" %> in jsp page. Please somebody explain me about this Thanks... By: David Hardwick - dhardwick RE: datasource..? 2003-08-05 20:48 The one is webapp example is neat example of a custom datasource. It's just an Object Array. It doesn't really connect to a database. I am not positive, but I believe the one in datasource connects to the open source hsql database that some of the other examples run with. To connect to a live db, you just need to pass the javax.sql.Connection object (typically you'll implement a data pool in a servlet/application server environment, so just pass the reference to the data pool connection) instead of the JRDatasource object in the WebApp example to call your live database. Regards, daveh By: mubasyir ahmad anwar - mubasyir RE: datasource..? 2003-08-05 21:15 Thanks for your explanation David.. May you also know how to this... If i have one page that already contain of object result from my Query..so How to make it possible to pass the object in jsp page.. Thanks.. Thanks By: mubasyir ahmad anwar - mubasyir RE: datasource..? 2003-08-05 21:18 Thanks for your explanation David.. May you also know how to do this... If i have one page that already contain of object result from my Query..so How to make it possible to pass the object in jsp page..is it only make modification in datasource..? Thanks.. Thanks By: David Hardwick - dhardwick RE: datasource..? 2003-08-06 07:06 If the object you are referring to is a ResultSet, then Teodore has already built a solution for that situation. You'll just need to work with the dori.jasper.engine.JRResultSetDataSource interface which raps the java.sql.ResultSet object. If you are referring to an object other than the ResultSet object, you can either just mimic the webapp example explicitly or try wrapping your object as a Resultset and proceeding from there. rock on, daveh Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now