Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JavaServer Faces Tooling User Guide
Previous Page Home Next Page

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

Validator Preferences

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

EL Validator Preferences Related concepts

JSF JSP Source Editing
JSF Application Configuration
JavaServer Faces Specification

Related reference

Tag Library Support
JSF Libraries

Related tasks

JSF Library References
Create JSF Application
Create JSF JSP Page

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire