Setup

  1. Install Tomcat and start it

  2. Start JDeveloper
  3. Create a new Empty Project called emp
  4. Double-click the emp project and select Libraries - add the Servlet Runtime and the Oracle JDBC libraries
  5. Right-click the emp project and select New
  6. Select Deployment Profiles from the General section in the left pane
  7. Select WAR File from the right pane
  8. Click OK
  9. As Deployment Profile Name, enter emp
  10. Click OK
  11. As Web Application's Context Root, select Specify J2EE Web Context Root and enter emp
  12. Under File Groups > WEB-INF/lib > Contributors, select Oracle JDBC
  13. Click OK

Developing the application

  1. Right-click the emp project and select New
  2. Select Servlets from the Web Tier section in the left pane
  3. Select HTTP Servlet from the right pane
  4. Click OK
  5. Click Next
  6. Step 1:
  7. Click Next
  8. Step 2:
  9. Click Finish

  10. Enter the source code for the EmpList servlet (click the name of the servlet to see source code)

  11. Repeat the above steps for the EmpEdit and EmpUpd servlets (click the names of the servlets to see source code)

  12. Compile the servlets (press Ctrl+F9)
  13. Right-click on the emp.deploy file and select Deploy to WAR file

Deploying the application

  1. Go to Tomcat Manager
  2. Scroll down to the WAR file to deploy section
  3. Click Browse and navigate to the emp.war file (e.g. D:\data\jdev10133\emp\deploy\emp.war)
  4. Click Deploy

Invoking the application

  1. Go to http://localhost:8080/emp/EmpList