Apache Struts 2 Plugin Registry > Home > HDIV Plugin |
Name | HDIV Plugin |
---|---|
Publisher | hdiv.org |
License | Open Source (ASL2) |
Version | 2.0.4 |
Compatibility | Struts 2.0.6+ |
Homepage | http://www.hdiv.org |
Download | http://sourceforge.net/project/showfiles.php?group_id=139104 |
HDIV plugin integrates HDIV (HTTP Data Integrity Validator) with Struts 2 adding Security functionalities: Integrity, Confidentiality of non editable data and Generic Validations of the Editable Data.
These are the steps to follow to install and configurate HDIV in a web application. For background information on the core HDIV concepts, visit HDIV's Reference
If validations for editable data have been defined, add hdiv-validations.xml as well.
![]() | Be Careful The extension defined by default is ".action". If there are extra extensions added in the struts.properties file, they must be added in the ValidatorFilter as well. Suppose that we modify the struts.properties file to accept the ".do" extension: So we modify the web.xml file adding the following value |
Add applicationContext.xml and hdiv-config.xml files in the WEB-INF directory of the web application. If validations for editable data have been defined, add the hdiv-validations.xml as well.
![]() | error page example |
![]() | start page example if your web application home page url is http://www.host.com/webapp-name?home.action, you have to declare "home" parameter on the value: |
This file is distributed in the HDIV's hdiv-struts-2.0.x-2.0.4.jar library, therefore, including the library in the web application classpath, HDIV's new classes to use by the Struts2 core, the new library for Velocity and Freemarker and a new interceptor for the validation of editable data will be configured.
Result Types redirect and redirect-action defined by default in struts-default.xml have been overwritten in struts-plugin.xml, in case we use these type of results (redirect, redirect-action) by dependency injection. For example:
We must modify the class defined in the type attribute and declare the following types depending on the result type we want to use:
![]() | Configuration For more information about HDIV's configuration you can read HDIV's Reference (chapter 7.2) |
There is an example to show how HDIV works. These are the steps to follow to install application:
![]() | More information about showcase web application You can get more details about configuration in the HDIV's Reference (chapter 8.2) |
Version | Date | Author | Notes |
---|---|---|---|
2.0.4 | Mar 11, 2008 | hdiv.org | Support for Struts 2.0.11 and Anti-CSRF token |
2.0.3 | Jan 14, 2008 | hdiv.org | Support for Spring 2.5 |
2.0.1 | Nov 14, 2007 | hdiv.org | Modified behaviour of file upload handler |
2.0 | Sep 13, 2007 | hdiv.org | Support for Struts 2.0.9 |
1.3 | June 20, 2007 | hdiv.org | Initial release |