I have come to the realization that there are some parts of
struts that I don't have a good grasp on so it's time to take a step back and get a solid understanding on the things that are confusing me.
<action path="/Selection" type="com.mysample.myproject.SelectionAction" name="SelectionForm" scope="request" validate="true" input="/Selection.do">
<forward name="success" path="/SelectionScreen.jsp"/>
<forward name="failure" path="/failure.jsp"/>
<forward name="invalidSession" path="/login.jsp"/>
</action>
I understand that the type is simply tying this action to a particular form.
I understand the scope is the length of time that this action will have effect.
I understand the forward parts depending on the result from the Action class.
The part that has me confused it the input. I want to be able to validate a form and ensure that there is only positive or zero numbers in the field. My question is where should the input be pointing to if there is an issue?
I'm confused on how that should work.
The page loads with the current values and then the user is given the option to change them before submitting the page. I want validation to ensure they meet the requirements before the page is submitted.
Can anyone offer some insight on this ?
Do I understand correctly in that when the current setup runs it simply re-sends the information to the page, repeating the errors in a continuous loop ?
thanks in advance for your time.
[ May 16, 2007: Message edited by: A knibbs ]