|
> Can anyone help? Just wrote my first JSP on the 400 (see below) and I get the error: Error getting compiled page. I/O Exception reported when compiling /QIBM/ProdData/IBMWebAS/servlets/pagecompile/_dscjava/_Query2_xjsp.jav a: javac: not found. **** listing of program ****** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>SAMPLEJSP SQL</title> </head> <body> <%@ import="java.sql.*" %> <% Connection con = null;%> <%! public Connection getConnection() { if (con != null) {return con;} try { Class.forName("com.ibm.as400.access.AS400JDBCDriver"); con = DriverManager.getConnection ( "jdbc:as400://XXXXXXX","ASCC","XXXXXX"); } catch( Exception e) { System.out.println("Error retrieving connection:" + e); return null; } %> <% con = getConnection(); if (con == null) { out.println("Sorry database not available."); return; } try { Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT * FROM QGPL.XDSPMSTR ORDER BY DSRNO") %> <table border=1 cellpadding=5> <th>DSR NUM</th> <th>USER NAME</th> <th>DSR TITLE</th> <% while (rs.next()) { %> <tr> <td><%= rs.getString("DSRNO")%></td> <td><%= rs.getString("UNAME")%></td> <td><%= rs.getString("TITLE")%></td> </tr> <% } %> </table> <% rs.close(); stmt.close(); } catch (SQLException e) { out.println("SQL error : " + e); } out.flush(); %> </body></html> </body> </html> --------------------------------------------- This message was sent using MHO WebMail. http://www.mho.net
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.