Menu
  • HOME
  • TAGS

FreeMarker template error! in struts2

java,jsp,struts2,freemarker,struts-validation

The exception is telling you exactly where to look for the error: org.apache.jasper.JasperException: Expression eKey is undefined on line 32, column 23 in template/simple/fielderror.ftl. - Class: freemarker.core.TemplateObject The culprit is a fieldError with an unmatching fieldName. After the tests (in the comments) it turned out to be full_name, appearently the...

AJAX validation fails for all form data

ajax,jsp,struts2,struts2-jquery,struts-validation

So many questions in a single one... BTW, here we go: 1. Even if I submit the form with correct data, my form shows error messages. This is due to the Interceptor Stack you are using: <interceptor-ref name="jsonValidationWorkflowStack"/> that is defined as <interceptor-stack name="jsonValidationWorkflowStack"> <interceptor-ref name="basicStack"/> <interceptor-ref name="validation"> <param name="excludeMethods">input,back,cancel</param>...

Struts 2 : Apply different XML validation files to one Action Methods

validation,struts2,struts-validation

Q: How can I Apply different XML validation files to the Methods of one Action ? You can create an XML validation file for each method of the Action, by using Action Alias naming convention, (instead of the default Action Class one). From the docs: Defining Validation Rules Validation...

Chaining visitor validator in Struts 2

validation,struts2,visitor,visitor-pattern,struts-validation

Yes, it is actually possible to chain visitors validators indefinitely. The conversion validator get the full field name and checks whether conversion error map holds that name or not. The problem is that in case of multiple chained visitor validators conversion validator cannot get the actual full field name (e.g....