Just on a hunch I grabbed a test jsp page from an O'Reilly book, tailored it and ran
it. It worked first time, proving that the servlet container does indeed see the same
database as in dbforms-config.xml
dbforms users setting things up the first time may find this script valuable.
Any help debugging the issue in the previous email is greatly appreciated. I'm not
able to use dbforms as of yet, will keep hacking away at it.
Thanks,
Bill
Below code from O'Reilly's jsp examples:
<html>
<head>
</head>
<%@ page language="java" import="java.sql.*" %>
<body>
<%
Class.forName("com.mysql.jdbc.Driver");
//assume database "test", user "root", password ""
// change this as per your requirements
Connection myConn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fin/?user=BigDaddy&password=Asecret");
Statement stmt = myConn.createStatement();
// assume you have a "grades" table with
// grades is various subjects and student names
// change this as per your requirements
String query = "select * from accounts";
ResultSet myResultSet = stmt.executeQuery(query);
if (myResultSet != null) {
while (myResultSet.next()) {
// specify the field name
String name = myResultSet.getString("account");
%>
<%= name %>
<br>
<%
}
}
stmt.close();
myConn.close();
%>
</body>
</html>N�HY隊X���'���u����hn�bp�'��j��yy�����h�y�b��'�(�TDj�wl�*i�x(��e��^��ߚ+�������Z��!���K-�+(}��{b�� ����Ka��i��0��b�HzG(���y�!��b�ܦ
v���lZ+���X�����m������+q��[~��