Download
FAQ History |
API
Search Feedback |
Modifying the J2EE Application
The Application Server and
deploytool
support iterative development. Whenever you make a change to a J2EE application, you must redeploy the application.Modifying a Class File
To modify a class file in an enterprise bean, you change the source code, recompile it, and redeploy the application. For example, if you want to change the exchange rate in the
dollarToYen
business method of theConverterBean
class, you would follow these steps.
- Edit
ConverterBean.java
.- Recompile
ConverterBean.java.
- In
deploytool
, select ToolsUpdate Module Files.- The Update Files dialog box appears. If the modified files are listed at the top of the dialog, click OK and go to step 6. If the files are listed at the bottom, they have not been found. Select one of those files and click Edit Search Paths.
- In the Edit Search Paths dialog box, specify the directories where the Update Files dialog will search for modified files.
- Select ToolsDeploy. Make sure that the checkbox labeled Save Object Before Deploying is checked. If you do not want to deploy at this time, select ToolsSave to save the search paths specified in step 5.
To modify the contents of a WAR file, you follow the preceding steps. The Update Files operation checks to see whether any files have changed, including HTML files and JSP pages. If you change the
index.jsp
file ofConverterApp
, be sure to typeasant
. This task copies theindex.jsp
file from theweb
directory to thebuild
directory.Adding a File
To add a file to the EJB JAR or WAR of the application, perform these steps.
Modifying a Deployment Setting
To modify a deployment setting of
ConverterApp
, you edit the appropriate field in a tabbed pane and redeploy the application. For example, to change a JNDI name fromATypo
toConverterBean
, you would follow these steps.
Download
FAQ History |
API
Search Feedback |
All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.