Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Database Access with JspDynpage


I want to know if it ist possible to access the WAS Database over JspDynpage.

If yes, can someone post me a tutorial or the way how to do that?

Thanks and Regards,


Former Member
Former Member replied

Hi Dennis,

U can create a connection and do datasource lookup and access the database.

InitialContext contx = new InitialContext();

DataSource datasource = (DataSource)contx.lookup("jdbc/SAP<SID>DB");

Connection connection = datasource.getConnection();

Statement stmt = connection.createStatement();

ResultSet rs = stmt.executeQuery("Select * from table");

Also refer to this link for another example.


Harini S

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question