When you use validation, the action declaration expects an input option. So, change:
<action name="UserAction" class="net.dg.oe.user.UserAction"> <result type="tiles" name="input">user.form</result> <result type="chain" name="error">user.form</result> <result type="chain">UserHome</result> </action> as <action name="UserAction" class="net.dg.oe.user.UserAction"> <result type="tiles" name="input">user.form</result> <result type="chain" name="error">user.form</result> <result type="chain">UserHome</result> <result name="input">input.jsp</result> </action> Good luck. -Srini lathjer wrote: > > I am new to Struts 2 and I can say that I am enjoying it but I am having a > hurdle I can't seem to figure out. > > I am working on getting validation done within my application and when I > try and use the validation frame work I keep getting this error whenever I > try and hit any page in my "/user" namespace. > > No result defined for action net.dg.oe.user.UserAction and result input > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:357) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:259) > > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:248) > ... > > This only happens when I put in my UserAction-validation.xml file for my > validation. > Also in my package xml if I put a result type of input under the default > action then the page displays the form twice, and throws different errors. > > Long story short, why does Struts 2 want an input for an action that > simply displays information, and are there any suggestions for how I can > fix/do this correctly? > > Here is my package xml: > > <package name="user" namespace="/user" extends="default"> > <result-types> > <result-type > class="org.apache.struts2.views.tiles.TilesResult" name="tiles" /> > </result-types> > > <default-action-ref name="UserHome" /> > > <action name="UserHome"> > <result type="chain">ListUsers</result> > </action> > > <!-- Action to list users on a "home page" --> > <action name="ListUsers" class="net.dg.oe.user.UserAction" > method="list"> > <result type="tiles">user.list</result> > </action> > > <!-- action for adding/editing a user --> > <action name="UserAction" class="net.dg.oe.user.UserAction"> > <result type="tiles" name="input">user.form</result> > <result type="chain" name="error">user.form</result> > <result type="chain">UserHome</result> > </action> > > <!-- Action to delete a user --> > <action name="DeleteUser" class="net.dg.oe.user.UserAction" > method="delete"> > <result type="chain" name="error">user.form</result> > <result type="chain" name="success">UserHome</result> > </action> > > </package> > > Thanks > > > -- View this message in context: http://www.nabble.com/Validation-causing-me-problems-tp20471257p20522397.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]