2.3.2. Struts Project Verification

JBoss Developer Studio provides 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 2.118. Struts Rules


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

Struts Configuration File

Figure 2.119. 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 2.120. 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 2.121. Error Message


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

JSP Page Verification

Figure 2.122. JSP Page Verification


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

Error Message

Figure 2.123. 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 2.124. Verify Command