Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Name

OVal Plugin

Publisher

Struts 2 Apache Software Foundation

License

Open Source (ASL2)

Homepage

this is it

Version

Bundled with Struts from 2.1.7 on

Homepage Download

http://svncwiki.apache.org/reposconfluence/asfdisplay/struts/sandbox/trunk/struts2-oval-plugin/Image RemovedWW/OVal+Plugin

Wiki Markup
{rate:title=Rating|theme=dynamic}

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:

...