# New Web Project with Existing Sources Wizard: Existing Sources and Libraries

Use to specify web pages and other resources when creating a new standard project from an existing web application source folder.

Your existing web application source does not have to adhere to any particular directory structure. You specify the locations of the configuration files, libraries, and source roots. The only requirement is that the module contain a valid `web.xml` deployment descriptor.

In the Existing Sources and Libraries page, you specify the following properties:

Element | Description
--- | ---
Web Pages Folder | Specifies the location of your web pages. You must have at least a valid web.xml deployment descriptor in the web pages folder to complete the wizard. Note: The IDE does not convert deployment descriptors for unsupported application servers to the Glassfish application server deployment descriptors. There are external tools you can use for this purpose.
WEB-INF Content | Specifies the location of the application's WEB-INF content.
Libraries Folder | Specifies the location of the class libraries that the web application depends on. All JAR files in this folder are added to the web application project's classpath and packaged with the application for deployment. Note: The IDE only scans this folder once when you create the project. After the project is created, adding JAR files to this folder outside the IDE does not add them to the module's classpath. You have to add them manually through the Libraries tab of the module's Project Properties dialog box.
Source Package Folders | Specifies each of the project's source package folders (containing source packages).
Test Package Folders | Specifies each of the project's test package folders (containing Unit tests). You can have multiple source roots in a standard project, with the following exceptions: The source root cannot already exist in another IDE project. The source root cannot already be added to another compilation unit of the same project. For example, a source root that is registered under Test Packages cannot be added to the list of Source Packages. All of the source roots are packaged into the same WAR file and share the same classpath. Note: If you have a source root that needs to be used by several projects, you should create a separate project for the source root and set up compilation dependencies between the projects.

When you click Finish, the folder specified as the Location property is used to determine where the web pages, Java sources and libraries are found. The project is created on your computer 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,

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