This topic describes common tasks you can perform with web application projects. For
more detailed information, click the links in the right column.
To perform this task |
Follow these steps |
Create a project. |
- Choose File > New
Project (Ctrl-Shift-N).
- Select the right template for your
project.
|
Choose a framework. |
For standard projects, support for JavaServer Faces and Struts is provided out-of-the-box.
The libraries and configuration files used by these frameworks are packaged with the IDE.
Code completion and other Source Editor functionality is also available for these frameworks.
To add a framework to an existing application, do the following:
- Right-click a standard web application and choose Properties.
- In the Project Properties dialog box, click Frameworks.
- Select JavaServer Faces, Struts, or both.
- Click OK to confirm your selection and exit the Project Properties dialog box.
|
Add a JAR file to a project's classpath. |
- In the Projects window, expand the project node and
right-click the Libraries node.
- Click Add JAR/Folder and select the JAR file in the file chooser.
If you also want to attach source code and Javadoc for the JAR file,
click Add Library instead.
|
Set up compilation dependencies between projects. |
- expand the project node and right-click the Libraries
node.
- Click Add
Project and select the project folder for the project that you want
to add to the project's classpath.
|
Open projects required by your web application. |
- In the Projects window, right-click the project node and choose Open
Required Projects.
A required project is a project that has been packaged with the application or
that has been added to its classpath.
|
Build a project. |
- Make sure that your resources are on the classpath.
- Choose Build > Build
Main Project (F11) or right-click any project node and choose Build
Project.
|
Clean a project. |
- Right-click the project node and choose Clean Project.
|
Run a project. |
|
Modify deployment settings. |
Do one or both of the following:
|
Debug a project. |
|
Attach source code to libraries for debugging. |
- Choose Tools > Library
Manager from the main window.
- If the JAR file is not already registered in the Library Manager,
create a new library using the Add Library button.
- Select the library in the left panel of the Library Manager.
- In the Classpath tab, click Add JAR/Folder and specify the location
of the JAR file containing the compiled class files. A library can contain
multiple JAR files.
- In the Sources tab, add the
folder or archive file containing the source code.
|
Add Javadoc to a project. |
- Choose Tools > Library
Manager from the main window.
- If the JAR file is not already registered in the Library Manager,
register the JAR file as described above.
- In the Javadoc tab, click
Add ZIP/Folder and specify the location of the Javadoc files.
|
Set the main project. |
- Right-click the project node and choose Set Main Project.
|