# Validating JSF Applications

A valid JSF application has a valid Faces configuration and JSP pages that are syntactically and semantically correct. The JSF Tooling, with the support of the WTP Tooling, will verify at design-time, as best it can, that the application can be executed at run-time.

### Validating an Application

From the application node in the explorer, choose "Validate". This action will validate all of the resources in the project using all validators enabled for "Manual". From the JSF application perspective, this will validate the following:

- Faces configuration files
- JSP files

To access the validators for the workspace: Window -> Preferences...-> Validation

The validators marked in yellow are those that have applicability to the JSF Web application.

### Validating Faces Configuration

At this time, when a faces configuration is validated, it only verifies that the XML is syntactically correct and that the data conforms to the faces-configuration schema. Future versions will perform semantic checks within a single faces configuration file and across all faces configuration files with an application.

### Validating JSF JSP Pages - The JSF View Validator

The JSF View Validator will verify that the attribute values supplied in the JSP page for certain tags are valid. This functionality relies on additional meta-data and classes being supplied by plugin providers for the tag libraries. The JSF Tooling team has provided validation support for:

- JSF Core Tag Library
- JSF HTML Tag Library

When there is a problem, there will be annotation markers in the rulers, problem markers in the problem view and "squigglies" underneath the problems in source. Errors are in red and must be dealt with whereas the yellow warnings may not result in runtime problems and may sometimes be ignored.

The validator will verify the attribute values with and without expression language (EL). These kinds of validations are treated differently. JSF EL is identified by "#{some expression}" in the attribute value.

If the JSF View Validator is enabled, validation will not only take place at Build and/or Manual validation time, but also as-you-type. Because validation of EL can be "expensive" you have the option of turning this option off separately.

To access the EL Validator preferences: Window -> Preferences... -> Web and XML -> JavaServer Faces Tools -> Validation

JSF JSP Source Editing
JSF Application Configuration
JavaServer Faces Specification

Tag Library Support
JSF Libraries

Create JSF Application
Create JSF JSP Page