New Web Application Wizard: Frameworks

Use to choose one or more frameworks that you want to use to provide a structure for your web application.

Element Description

JavaServer Faces

Specifies that you want the IDE to provide the JSF libraries, create a JSF index page for your project and generate the necessary elements in the web.xml configuration file. For details, see .

If you select the JavaServer Faces checkbox, you can set the JSF servlet URL pattern and preferred page language in the Configuration tab. In the Libraries tab, you can specify which registered libraries to use. You can also create a new library and choose whether libraries can be appended.

Spring Web MVC

Specifies that you want the IDE to provide the Spring libraries and create the following files for your application:
  • web/WEB-INF/applicationContext.xml
  • web/WEB-INF/[dispatcher]-servlet.xml
  • web/WEB-INF/redirect.jsp
  • web/WEB-INF/jsp/index.jsp

If you select the Spring Web MVC checkbox, you can set the default dispatcher name and mapping.

    Libraries

Select a Spring library from the drop-down list and whether whether JSTLs will be included in the project..

    Configuration

In the Configuration tab you can set the default dispatcher name and mapping.

        Dispatcher Name

Type a name for the default Spring dispatcher servlet.

        Dispatcher Mapping

Specify the mapping of the dispatcher. The default is set to *.htm

Dispatcher mappings are based on the Java Servlet Specification Section SRV.11.2. In the web application deployment descriptor, the following syntax is used to define standard mappings:

  • A string beginning with a '/' character and ending with a '/*' postfix is used for path mapping.
  • A string beginning with a '*.' prefix is used as an extension mapping.
  • A string containing only the '/' character indicates the default servlet of the application. In this case the servlet path is the requested URI minus the context path and the path info is null.
  • All other strings are used for exact matches only.

Struts

Specifies that you want the IDE to provide the Struts libraries and create the following files for your application:
  • welcomeStruts.jsp
  • struts-config.xml
  • tiles-defs.xml
  • validator-rules.xml
  • ApplicationResource.properties

For details, see .

If you select the Struts checkbox, you can set the servlet name and URL pattern. You can also set the application resource and specify whether the IDE adds Struts TLDs.

Hibernate

Specifies that you want the IDE to provide the Hibernate libraries and create the Hibernate configuration file hibernate.cfg.xml for your project.

For details, see .

If you select the Hibernate checkbox, you need to provide the database connection for the project by selecting a connection from the drop-down list. The drop-down list contains the database connections registered with the IDE in the Services window. If the desired database connection is not listed, select New Database Connection from the list to create a new connection. When you select the database connection the IDE automatically determines the appropriate database dialect.

The IDE uses the information you supply in this dialog to generate the Hibernate configuration file.


When you click Finish, the project is created in your file system and opened in the IDE. You can view its logical structure in the Projects window and its file structure in the Files window.


Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.