Appendix C. SQLJ in Applets, Servlets, and JavaServer Pages

This appendix provides working examples of SQLJ being used in three types of common Java deployment scenarios: an applet, a servlet, and a JavaServer Pages (JSP) file. I demonstrate how each of these can contain SQLJ statements. The example files are available for download from this book's web site.

For performance reasons, you may not necessarily want to add SQLJ to these types of Java programs, but I want to show how you can do so. A better approach, from a performance perspective, might be to add your SQLJ statements to Enterprise JavaBeans, as described in Chapter 6.

Get Java Programming with Oracle SQLJ 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.