Third and fifth steps teach how to use Eclipse to compile JSP, skip this step directly to write with documents. You can also skip 3-4 to see you to see JavaBean to implement the calling process.
Step 1: Create an Oracle table
(We do demonstrate with a simple staff information table)
The second step: the establishment of an Oracle stored procedure CREATE OR REPLACE procedure emp_test (e_id number, e_name varchar2, e_dept varchar2, e_age number) asbegininsert into emp_info_test (emp_id, emp_name, emp_dept, emp_age, emp_login_time) values (e_id, e_name, e_dept, e_age , sysdate;
Step 3: Create a Lomboz J2EE Project (Eclipse configuration method) with Eclipse) 1. Establish Lomboz J2EE Project 2. Set the project name -> Next -> Next 3. Set the web module and Servers module See below 4. Create a JSP file (I created the file named trypro)
Step 4: Write code for TryPro: (with Tomcat connection pool. Connection pool setting method See Tomcat and Oracle 3 connection methods)
<% @ page language = "java" contenttype = "text / html; charset = GB2312"%> <% @ Page Import = "java.sql. *"%> <% @ page import = "javax.sql. *" %> <% @ page import = "javax.naming. *"%>