Web Application Deployment Tasks: Quick Reference

This topic describes common tasks related to running web applications. You define most of the settings below when you create a web application or a web component. Use the tasks below to customize your settings. For more detailed information, click the links in the right column.

To perform this task Follow these steps
Set request parameters for JSP files.
  1. Right-click the JSP file in the Projects or Files window and choose Properties.
  2. In the Request Parameters property, type the parameters in the  format.
  3. Click OK.
Set execution URIs and parameters for servlets and web services.

You can only set a request URI for a servlet or web service if it is registered (i.e., if it has servlet mappings) in the deployment descriptor (web.xml file). The mappings can be created automatically by the IDE when you create a servlet in the New File wizard. Otherwise, you have to create it by hand in the web.xml file.

Note that the default URI is defined in the mappings in the web.xml file.

  1. Select the servlet in the Projects or Files window.
  2. Choose Tools > Set Servlet Execution URI in the main menu.
  3. Type the execution URI and parameters.
  4. Click OK.
Set the web server.
  1. Right-click the project node in the Projects window and choose Properties.
  2. Click Run.
  3. Select the web server from the server drop-down menu.
Set the context path and relative URL.
  1. Right-click the project node in the Projects window and choose Properties.
  2. Click Run.
  3. Type a context path and, optionally, a relative URL.
Deploy a project.
  1. Right-click the project and choose Deploy.

    The project is compiled. If the application has already been deployed to the server, it is undeployed (all the content is deleted). The application WAR file is then deployed to the appropriate deployment directory.
Run a project.
  1. Choose Run > Run Main Project (F6) or right-click any project node and choose Run.

    The project is compiled, and new and changed files are copied from the project's build directory to the WAR's deployment directory. The deployed application then opens in a browser.
Run a single file.
  1. Select one or more files in the Projects window, Files window, or Source Editor.
  2. Choose Run > Run File > Run File from the main menu.
Repackage an existing WAR file for deployment on a different application server.
  1. Create a Packaged Archive project based on the existing WAR file.
  2. In the new project, modify the appropriate configuration files and create any necessary server-specific files.

Legal Notices