Previous Next vertical dots separating previous/next from contents/index/pdf

3. Create a new Hibernate Web Application project

A web application project is an Eclipse project that contains the source code, web pages, images, resources, and configuration files for building a Java program that can be deployed to a Web Container.

3.1. Create new web application project

  1. Open Workshop Studio in a new workspace. (If Studio opens in an existing workspace, create a new workspace by clicking File > Switch Workspace then choosing Browse and clicking Make New Folder to create a new workspace folder).
  2. Click New Example Web Project on the AppXplorer view.

  3. The New Example wizard provides various options for creating a new web application project. Choose Workshop Hibernate Tutorial from the list.

  4. Click Next.
  5. Verify workshop-hibernate-tutorial for the project workspace folder for the tutorial example files and click Next.
  6. Review Java build settings. By default, Workshop-Hibernate-Tutorial/web/WEB-INF/src/java is selected as source folder and Workshop-Hibernate-tutorial/web/WEB-INF/classes as output folder.
  7. Click Finish to create the new Hibernate web application project.

3.2. Review web application artifacts

Below is the summary of different parts of the web application structure.

Folder or file Overview
workshop-hibernate-tutorial Project folder with project name
  /web (Web App Root) Root folder for web application artifacts
    /Faces Configuration Lists JSF configuration elements
    /Hibernate Configuration Displays list of Hibernate persistent entities
    /pages Folder for HTML and JSP presentation pages
    /hsqlDB Hypersonic Database and JDBC drivers
    /Resources Supporting files being used in Hibernate application
    /WEB-INF Holds folders / files used as part of the runtime Web application
      /classes Holds class files for the web application
      /config Holds JSF configuration file

      /lib Folder to place third-party .jar files which is used at run-time i.e. .jar file for logging, tag libraries, JDBC drivers etc.
      /src/java Folder to place java source files
      /tld Folder to place tag library definition files
      web.xml Deployment descriptor for web application
  /web/WEB-INF/src/java Folder that maps to src/java folder where you can place java source files
    /resources Folder to place the resource files
      application.properties Application configuration resource file
    hibernate.cfg.xml Hibernate configurations file
  /Referenced Types Java classes referenced by web artifacts

Click one of the following arrows to navigate through the tutorial:

 

Skip navigation bar   Back to Top