Transform & Execute Apache Struts 1.x based validations to Bean Validation through JSF
||International Journal of Computer Trends and Technology (IJCTT)||
|© 2019 by IJCTT Journal|
|Year of Publication : 2019|
|Authors : Vijay Kumar Pandey|
|DOI : 10.14445/22312803/IJCTT-V67I4P105|
MLA Style: Vijay Kumar Pandey "Transform & Execute Apache Struts 1.x based validations to Bean Validation through JSF" International Journal of Computer Trends and Technology 67.4 (2019): 24-28.
APA Style:Vijay Kumar Pandey (2019). Transform & Execute Apache Struts 1.x based validations to Bean Validation through JSF. International Journal of Computer Trends and Technology, 67(4), 24-28.
The paperis intended to provide an understanding of how to transform and execute Apache Struts 1.x based validation to Bean Validation and then execute the transformed validate method through Java Server Faces (JSF) runtime. JSF by default executes the validation PROCESS_VALIDATIONS after the APPLY_REQUEST_VALUES phase and if there are no validation issues then the control passes to UPDATE_MODEL_VALUES phase else it goes to the RENDER_RESPONSE phase. While in the Struts 1.x application, first the Struts action form is populated with the request parameter values and then only it’s ‘validate’ method is executed. So direct mapping of struts validation execution process will fail in JSF since model (action form) will not be populated with the request parameterswhen the validation is executed.
 Apache Commons Validator - https://commons.apache.org/proper/commons-validator/
 OmniFaces - http://omnifaces.org/
 Bean Validation 2.0 JSR 380- https://beanvalidation.org/2.0/
 Java Server Faces - https://javaee.github.io/javaserverfaces-spec/
 Struts Validation in ActionForm - https://www.owasp.org/index.php/Struts_Validation_in_an_ActionForm
Struts, JSF, ‘’validate’ method,Bean Validation (BV), OmniFaces, ThreadLocal, ActionForm, ControllerBean, TagHandler.