views:

201

answers:

0

Hi,

Because of some design specification we have to extend all controllers in spring MVC from a class that extends AbstractCommandController. I am trying to include the spring FTL based form validations in my FTL file, but it gives me an error like

    Method public org.springframework.web.servlet.support.BindStatus org.springframework.web.servlet.support.RequestContext.getBindStatus(java.lang.String) throws java.lang.IllegalStateException threw an exception when invoked on org.springframework.web.servlet.support.RequestContext@b05cd7 with arguments of types [java.lang.String,]
The problematic instruction:
----------
==> assignment: status=springMacroRequestContext.getBindStatus(path) [on line 120, column 9 in spring.ftl]
 in user-directive spring.bind [on line 47, column 33 in myProfile.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public org.springframework.web.servlet.support.BindStatus org.springframework.web.servlet.support.RequestContext.getBindStatus(java.lang.String) throws java.lang.IllegalStateException threw an exception when invoked on org.springframework.web.servlet.support.RequestContext@b05cd7 with arguments of types [java.lang.String,]

I have put the command name properly in the controller class and in the controller class, neither the specified name nor the default "command" works.

Some help please. And would be much appreciated if it comes with an example.

Thanks in advance, Adhir Aima