Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

struts action mapping action input attribute

Tags:

I am a noob when it comes to Java and Struts ( I feel like .Net boy in Java world ).

What is the input attribute on the action element used for? So in the example below the input is someinput.jsp.

<action path="/somepath"          type="SomeAction"          name="SomeForm"          scope="session"         input="someinput.jsp"> 
like image 778
rabs Avatar asked Jul 11 '11 01:07

rabs


1 Answers

If the form bean SomeForm returns validation errors, it will return the page someinput.jsp. To quote the corresponding DTD:

Valid only when "name" is specified. Required if "name" is specified and the input bean returns validation errors. Optional if "name" is specified and the input bean does not return validation errors.

like image 137
Ken Chan Avatar answered Nov 12 '22 09:11

Ken Chan