background image

Dynamic Reloading

<< Listing Deployed Web Modules | Undeploying Web Modules >>
<< Listing Deployed Web Modules | Undeploying Web Modules >>

Dynamic Reloading

To update the project in NetBeans IDE:
Right-click on the project and select Build Project.
Right-click on the project and select Deploy Project.
To update the project using the Ant build tool:
Type ant to copy the modified JSP page into the build directory.
Type ant deploy to deploy the WAR file.
To view the modified module, reload the URL in the browser.
You should see the screen in
Figure 3­6
in the browser.
Dynamic Reloading
If dynamic reloading is enabled, you do not have to redeploy an application or module when
you change its code or deployment descriptors. All you have to do is copy the changed JSP or
class files into the deployment directory for the application or module. The deployment
directory for a web module named context-root is
domain-dir/applications/j2ee-modules/context-root. The server checks for changes
periodically and redeploys the application, automatically and dynamically, with the changes.
This capability is useful in a development environment, because it allows code changes to be
tested quickly. Dynamic reloading is not recommended for a production environment,
however, because it may degrade performance. In addition, whenever a reload is done, the
sessions at that time become invalid and the client must restart the session.
FIGURE 3­6
New Greeting
Web Modules
Chapter 3 · Getting Started with Web Applications
87