Adjusting the controller configuration
Now, that we defined our forms, we need to adjust our controller configuration to perform validations.
In /WEB-INF/calyxo-control-config-outside.xml we have to add a <plugin> element to load the forms plugin. Add the following to the <plugins> element:
<!-- Install forms plugin -->
<plugin class="de.odysseus.calyxo.forms.control.FormsPlugin">
<param name="config" value="/WEB-INF/calyxo-forms-config-outside.xml"/>
</plugin>
The forms plugin provides a filter, which may be used by actions to trigger form validation. You tell the filter about what form definition to apply and what dispatch configuration to use when validation failes. Change the /login action to the following:
<!-- Login action -->
<action path="/login" class="de.odysseus.calyxo.sample.login.LoginAction">
<filter name="forms">
<param name="form" value="login"/>
<param name="dispatch" value="input"/>
</filter>
<dispatch name="success" module="inside" action="/index"/>
<dispatch name="input" path="/login.page"/>
</action>


