O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required