Profuct name is " + getValue(request) + "
" ); out.println("Price of " + getValue(request) + " is " + get_price( values2, out ) + "
" ); out.println("Return to input form"); out.println(""); out.close(); } private String getValue( HttpServletRequest request ) { String values = request.getParameter( "name" ); // ブラウザから送られた値を受け取る if( values != null ) { return( values ); } return( "error occured!" ); } // Access sample_db and returns price private int get_price( String values2, PrintWriter out ) { Connection conn = null; Statement stmt = null; ResultSet rs = null; values2 = getValue(request); int price = 0; try { conn = DriverManager.getConnection( "jdbc:mysql://localhost/sample_db", // url form of db "admin", // user name "******" // password ); stmt = conn.createStatement(); rs = stmt.executeQuery( "SELECT price FROM product WHERE name = '" + values2 +"'" ); rs.first(); price = rs.getInt( "price" ); // get the value of the first column } catch ( SQLException ex ) { out.println( "SQLException: " + ex.getMessage() + "
" ); out.println( "SQLState: " + ex.getSQLState() + "
"); out.println( "VendorError: " + ex.getErrorCode() + "
"); } finally { if( rs != null ) { try { rs.close(); } catch (SQLException ex) {} rs = null; } if( stmt != null ) { try { stmt.close(); } catch (SQLException ex) {} rs = null; } } return( price ); } } ========================================================================= 上記ソースコードをコンパイル(javac)しても 以下のエラーが発生してしまいます。 【エラーメッセージ】 ========================================================================= action.java:25: エラー: シンボルを見つけられません out.println("