EDT:Tutorial: RUI With Database Lesson 11
|< Previous | Next >|
Lesson 11: Deploy and test the payment application
During the deployment process, EGL creates HTML files and server-specific code to match your target environment.
Deployment is a two stage process:
- Internal deployment, when you deploy your handlers to a web project.
- External deployment, when you deploy the web project to an application server.
After you deploy the tutorial application internally, you can run it on an application server in the workbench.
Edit the deployment descriptor
The EGL deployment descriptor manages the internal deployment and is created automatically in each EGLSource folder. The main handler is in the PaymentClient. You use the EGL deployment descriptor in the PaymentClient/EGLSource folder.
To edit the EGL deployment descriptor:
- In the EGLSource folder, double-click the PaymentClient.egldd file. The EGL deployment descriptor opens in the deployment descriptor editor. EGL automatically added the embedded handlers to the list of Rich UI handlers to deploy.
- Because you are using a dedicated service, you do not need to add information to the Service Bindings Configuration section. The list is empty.
- Under Deployment Target, next to
the Target project field, click New.
The Dynamic Web Project wizard opens.
- In the Project Name field, enter the name PaymentWeb. Any web project is acceptable. You are creating a simple one for the purposes of the tutorial.
- For Target runtime, select Apache Tomcat v6.0. The value of the Configuration field changes automatically to match the new runtime environment.
- Add the SQL database binding to the deployment descriptor as you did for the ServiceProject deployment descriptor as described in the section Create binding to database connection
- Click Finish. EGL creates the web project and re-displays the deployment descriptor.
- Save and close the deployment descriptor.
Deploy the Rich UI application
You can now launch the deployment process:
- In the EGLSource folder, right-click the PaymentClient.egldd file.
- Click Deploy EGL Descriptor.
The deployment process requires no further action on your part. The process copies many files and might take several minutes.
- If the Tomcat server shows a status of Restart, consider that statement a directive: restart the server by right-clicking the server name and click Restart. When the server has restarted, the status is Started, Synchronized.
Run the generated code
- To run the internally deployed code, focus your attention on the target project, PaymentWeb. In the PaymentWeb/WebContent folder, find PaymentFileMaintenance.html.
- Right-click the file name and click Run As > Run on Server
The Run On Server window opens.
- In the Run On Server window, select
the appropriate server and click Always use this server
when running this project. Click Finish.
- If you are using Tomcat and see a page not found error
(404), check whether the server is showing a Restart status. If so,
restart the server and refresh the page.
The page opens.
- Test the application by adding, deleting, and modifying payment records.
- Help topic: Introduction to EGL generation and deployment
You learned how to complete the following tasks:
- Edit a deployment descriptor to deploy a Rich UI handler.
- Run the application on an application server.
|< Previous | Next >|