Summary

This chapter covered a lot of ground, including a quick overview of both JSP and JDBC. JSP files look like Java embedded in HTML, but they end up being turned into HTML embedded in Java. You can find the .java file that was produced from a JSP file in the work subdirectory of Tomcat; you can use these files to help debug errors. JDBC is the connection between JSP and a SQL database. You can use either Statement or PreparedStatement to run a query, depending on whether you will need to rerun it or pass in parameters to the query. Data is returned from a JDBC query in a ResultSet.

You also learned that you can get values from an individual row using the getX methods, that executeUpdate allows you to insert, modify, or delete rows from the ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.