ILOG JRules User Guide > Executing Rules > Getting Started > Tutorial: Creating a Web Application to Invoke JRules on IBM Rational Application Developer > Task 5: Running and Debugging Your Web Application with Rational Application Developer

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:

  1. In the Project Explorer, double-click loan_validationWeb/WebContent/executerules.jsp to open it in the editor.
  2. Click the Source tab in the executerules.jsp view.
  3. 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);
images/RAD17.png
  1. In the Project Explorer, right-click loan_validationWeb and select Debug As > Debug on Server.
  2. In the Define New Server view, choose the server you defined.
  3. images/RAD18.png
  4. Click Finish.
  5. The application opens in a Web browser embedded in Rational Application Developer.
  6. Click Start loan validation.
  7. Click Next Step, then Calculate loan.
  8. images/RAD19.png
    During the calculation, executerules.jsp is invoked and the calculation is stopped.
  9. When prompted to change to the Debug perspective, click Yes.
  10. The Debug perspective opens.
    images/RAD20.png
    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.

images/arrow_next.gif Next: Task 6: Deploying the Loan Validation RuleApp