|
Home TOC Index |
|
Search
Feedback |
Modifying the J2EE
Application
Since the J2EE SDK is intended for experimentation, it supports 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, suppose that you want to change the exchange rate in the
dollarToYenbusiness method of theConverterBeanclass:
- Edit
ConverterBean.java.- Recompile
ConverterBean.javaby typingant converter.- In
deploytool, select ToolsUpdate Files.
- A dialog box appears reporting the changed file. Verify that
ConverterBean.classhas been changed and then dismiss the dialog box.- Select Tools
Deploy. Make sure the checkbox labeled Save Object Before Deploying is checked.
You can also perform steps 4 and 5 by selecting Tools
Update And Redeploy. The
deploytoolutility replaces the old JSP file inConverterApp.earwith the new one and then redeploys the application.Adding a File
To add a file to the EJB JAR or WAR of the application, perform these steps:
- Select the JAR or WAR.
- Select the General tab.
- Click Edit.
- In the tree of the Available Files field, locate the file and click Add.
- Click OK.
- From the main toolbar, select Tools
Update And Redeploy.
Modifying the Web Client
To modify the Web client, follow these steps:
- Edit
index.jsp.- Execute
ant converterto copy the modified file to the build directory.- In
deploytool, select ToolsUpdate Files.
- A dialog box appears reporting the changed file. Verify that
index.jsphas been changed and then dismiss the dialog box.- Select Tools
Deploy. Make sure the checkbox labeled Save Object Before Deploying is checked.
You can also perform steps 4 and 5 by selecting Tools
Update And Redeploy. The
deploytoolutility replaces the old JSP file inConverterApp.earwith the new one and then redeploys the application.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 the JNDI name of theConverterBeanfromATypotoMyConverter, you would follow these steps:
|
Home TOC Index |
|
Search
Feedback |