You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Name

OVal Plugin

Publisher

Struts 2

License

Open Source (ASL2)

Homepage

this is it

Download

http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-oval-plugin/

Overview

OVal is a pragmatic and extensible validation framework for any kind of Java objects (not only JavaBeans). Constraints can be declared with annotations (@NotNull, @MaxLength), POJOs or XML.Custom constraints can be expressed as custom Java classes or by using scripting languages such as JavaScript, Groovy, BeanShell, OGNL or MVEL.

The OVal plugin provides support for using the OVal Validation Framework

Availability

This plugin is still in the Struts Sandbox, to use, you will have to check it out from svn and build it.

Installation

The jar plugin needs to be added to the lib directory of your application as well as other dependencies. If you are using XML validation, XStream needs to be included. Here is the maven dependency example:

<dependency>
    <groupId>com.thoughtworks.xstream</groupId>
    <artifactId>xstream</artifactId>
    <version>1.3.1</version>
</dependency>

The plugin defines a "ovalValidation" interceptor and a "ovalValidationStack" in the "oval-default" package. To use this interceptor, extend the "oval-default" package and apply the interceptor to your action, like:

 
  • No labels