JBoss.orgCommunity Documentation

Chapter 8. Struts Project Verification

This section covers the Struts project verification functionality provided by JBoss Tools.

To configure Struts project verification select Window → Preferences from the menu bar, select JBoss Tools → Web → Verification from the Preferences dialog box, and then expand the Struts Rules node.

Struts Rules

Figure 8.1. Struts Rules


Suppose you are working in the Source viewer for a Struts configuration file as shown below:

Struts Configuration File

Figure 8.2. Struts Configuration File


While typing a class name or entering it from the graphical editor, you might make a minor typo (like "sample.GreetingAction1" instead of "sample.GreetingAction"). After saving the file, it is verified to make sure everything is correct and finds the error shown below:

Error Reporting

Figure 8.3. Error Reporting


Notice that the Package Explorer View shows a marked folder and a marked file to indicate where the error is.

You can place the cursor over the line with the error to view a detailed error message:

Error Message

Figure 8.4. Error Message


The verification process also checks to make sure you have specified the correct JSP page for the forward:

JSP Page Verification

Figure 8.5. JSP Page Verification


Once you place the cursor over the line, you can see the error message:

Error Message

Figure 8.6. Error Message


You can always invoke the verification process by switching to the Diagram viewer, right-clicking and selecting Verify from the context menu:

Verify Command

Figure 8.7. Verify Command