JDBC 4.0 and Oracle JDeveloper for J2EE Development
上QQ阅读APP看书,第一时间看更新

Setting the Environment

Download JDeveloper 10.1.3 from: http://www.oracle.com/technology/software/products/jdev/index.html. Extract the JDeveloper zip file to a directory, which installs the JDeveloper IDE. Download the Oracle database. Install the Oracle database including the sample schemas. We need to copy the Oracle database 11g JDBC drivers JAR file, ojdbc6.jar, for JDBC 4.0 to C:\JDeveloper\j2ee\home\applib directory. Keep a copy of the JDBC JAR files and delete them from the C:\JDeveloper\jdbc\lib directory. Copy back the deleted JDBC JAR files to the directory after running the JSTL application. We also need to set the J2SE Version to JDK 6.0 as explained in Chapter 2. In JDeveloper, create a project for the JSTL SQL taglib. Select File | New, and in the New Gallery window, select General in the Categories list and Application in the Items list. Click on OK button. In the Create Application window, specify an Application Name, JSTLApp, and click on OK. In the Create Project window specify a Project Name, JSTLSQL, and click on OK. An Application and a Project node get added to the Applications Navigator.

Setting the Environment

Select the project node and select File | New. In the Categories, select Web Tier | JSP and select JSP in the Items listed, and click on OK. In the Create JSP Wizard, click the next button. In the Web Application window, select J2EE 1.4 which is required for JSTL 1.1, and click on Next. In the JSP File window, specify a File Name, catalog.jsp, and click on Next. Select the default setting, Do Not Use an Error Page to Handle Uncaught Exceptions in This File, in the Error Page Options window and click on next. In the Tag Libraries window, select the libraries JSTL Core 1.1 and JSTL SQL 1.1 and click on the Next button.

Setting the Environment

Select the default settings in the HTML Options window, and click on Next. Once you click on Finish in the Finish window, a JSP and a web.xml get added to the project.

After creating a project in JDeveloper in the Applications-Navigator, select the project node and select Tools | Project Properties. Select the Libraries node in the Project Properties window. The libraries should be listed in the project libraries. If any of these libraries is not in the project libraries, add a library with the Add Library button. For example, to add the JSTL 1.1 library, click on Add Library and select the JSTL 1.1 library and then click on OK

Setting the Environment