The IDE uses an Ant script to run your web applications. If you are using a , the IDE generates the build script based on the options you enter in the project's Project Properties dialog box. You can set the project's classpath, context path, and web server in the Project Properties dialog box. You can further customize program execution by editing the Ant script and Ant properties for the project.
If you are using a , the IDE uses your existing Ant script to run your project. You can write a target that executes the currently selected project in the IDE and map it to the Deploy command.
You can execute your web application from the IDE using one of the supported servers that implement a J2EE web container. The process for running a web application is slightly different depending on which server you use. For more information about specifying the server on which to run the web application, see Changing the Target Server. Some servers do not support web applications in WAR format. In such cases, it might be necessary to extract the WAR file within the server before deploying. For details on whether the server you intend to use supports JSP files and WAR files, see the documentation accompanying your server.
To execute a web application, the web server requires a configuration file. When you create a web application from the IDE, the IDE creates the necessary server configuration for you.
All the resources that the web application uses must be in the server's classpath and their placement must follow the WAR structure:
Troubleshooting
If you get "file not found" errors when you execute a web application, see Accessing Local files Through a Proxy for possible solutions.
If the browser does not reflect changes in a JSP file or HTML file, this might be because of the way the browser is caching pages. Check the browser's settings to ensure that the browser is reloading the page every time you access it.