Description:
While using a Form with input fields, we get this error
<action path="/Login"
name="userForm"
type="com.dct.struts.learning.actions.UserAction">
<forward name="success" path="/pages/login.jsp"></forward>
</action>
Solution:
This means after doing a validation, we need to specify where to be forwarded, incase of a failure. Hence the parameters "validate" and "input"(place from where it comes & to where it needs be forwarded) should be specified.
<action path="/Login"
name="userForm"
type="com.dct.struts.learning.actions.UserAction"
validate="true"
input="/login.jsp">
<forward name="success" path="/pages/login.jsp"></forward>
</action>
While using a Form with input fields, we get this error
<action path="/Login"
name="userForm"
type="com.dct.struts.learning.actions.UserAction">
<forward name="success" path="/pages/login.jsp"></forward>
</action>
Solution:
This means after doing a validation, we need to specify where to be forwarded, incase of a failure. Hence the parameters "validate" and "input"(place from where it comes & to where it needs be forwarded) should be specified.
<action path="/Login"
name="userForm"
type="com.dct.struts.learning.actions.UserAction"
validate="true"
input="/login.jsp">
<forward name="success" path="/pages/login.jsp"></forward>
</action>
No comments:
Post a Comment