Creating JSPs for CRUD

We have created the required configuration files for Hibernate. Next, we will create the JSPs to persist, load, update, and delete POJO domain objects, which are also referred to as create, read, update, delete (CRUD). Perform the following steps to accomplish this:

  1. Select File | New | Other, and in New, select Web | JSP File and click on Next.
  2. In New JSP File, select the webapp folder and specify File name as schemaExport.jsp. Click on Next, as shown in the following screenshot:
    Creating JSPs for CRUD
  3. Select the New JSP file (html) template, which is also the default, and click on Finish. The schemaExport.jsp file gets added to the webapp folder.
  4. Similarly, use add.jsp (to add table data), find.jsp (to find table data), update.jsp (to update a table row), and delete.jsp (to delete a table row).

The directory structure of the jboss-hibernate project is shown in the following screenshot. The JSP files might indicate an error, which will get fixed as the application is developed and the Maven dependencies are added.

Creating JSPs for CRUD
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset