Task 5: Running and Debugging Your Web Application with Rational Application Developer
|
PREVIOUS
NEXT
|
Once the server configuration is defined, you can run the application in debug mode and step through the code.
To run and debug your Web application with Rational Application Developer:
-
In the Project Explorer, double-click
loan_validationWeb/WebContent/executerules.jsp to open it in the editor.
-
Click the Source tab in the
executerules.jsp view.
-
Right-click the left margin of the window and click Toggle Breakpoint to add a breakpoint on the following line:
IlrSessionResponse sessionResponse =
ruleSession.executeRules(sessionRequest);
-
In the Project Explorer, right-click
loan_validationWeb and select Debug As > Debug on Server.
-
In the Define New Server view, choose the server you defined.
-
Click Finish.
The application opens in a Web browser embedded in Rational Application Developer.
-
Click Start loan validation.
-
Click Next Step, then Calculate loan.
During the calculation,
executerules.jsp is invoked and the calculation is stopped.
-
When prompted to change to the Debug perspective, click Yes.
The
Debug perspective opens.
The application is deployed and can be debugged. However, if you continue the execution, an error message is displayed as the RuleApp is not deployed.
| Notes |
Breakpoints are ignored if step-by-step mode is activated. You can deactivate step-by-step mode in the Debug panel.
To set a server for a project (for example, loan_validationWeb), in the Project Explorer right-click the project folder and click Properties. Click Server, select a server and click OK.
|
In next step, you will deploy the loan validation RuleApp. Once this is completed, the application will run properly and can be debugged in Rational Application Developer.
Next: Task 6: Deploying the Loan Validation RuleApp