10. Checking for Consistency after Changes

In this section, you will see how Workshop advises you of the potential problems that can develop as you make changes to your application.

The Workshop group of products maintain an incrementally updated database containing all the interdependencies and relationships between the web application artifacts. For example:

When any of the web application artifacts are modified, the IDE automatically performs a consistency check and reports any problems that it detects as warnings.

An important benefit of this approach is that problems are detected early during development of the web application without the need for an explicit "build" or "check" operation.

Producing a Java Source File Inconsistency

  1. Return to the J2EE perspective from the Debug perspective.
  2. Double-click checkoutPayment.jsp in the AppXplorer to open this page.
  3. In the JSP Variables section of the Design Palette view, right-click the profile variable, and choose the first menu item. The Profile.java file, which implements the variable type, is opened.
  4. Press Ctrl-F to search for the getFirstName() method:
  5. public String getFirstName()

    {

      return m_firstName;

    }

  6. Change getFirstName() to getGivenName(), and save the Java file.
  7. A warning is displayed in the Problems view indicating that the firstName field is undefined for the type Profile.

  8. Change getGivenName() back to getFirstName().
  9. Saving the Java file removes the error entry from the Problems view.

Producing a Struts Configuration File Inconsistency

  1. Double-click WEB-INF/struts-config.xml in the AppXplorer to open this page.
  2. Modify the value of the Path field for the first Action Mapping in the list from /changeLocale to /changeLanguage.
  3. Press Enter to confirm the entry, and then save the file.
  4. A warning is displayed in the Problems view, indicating that the changeLocale action cannot be found in the Struts configuration file.

  5. Change /changeLanguage to /changeLocale, and then press Enter to confirm the entry.
  6. Saving the file removes the warning from the Problems view.

 

Click the arrow to navigate through the tutorial:


Still need help? Post a question on the Workshop newsgroup.