JBoss.org Community Documentation

Chapter 8. Struts Project Verification

JBoss Tools provide the same functionality for Struts projects. 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, verification checks to make sure everything is correct and finds the error below:

Error Reporting

Figure 8.3. Error Reporting


Notice that the Package Explorer View shows a marked folder and a marked file 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 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 by switching to the Diagram viewer, right-clicking and selecting Verify from the context menu:

Verify Command

Figure 8.7. Verify Command