You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robert Williams <rc...@pacbell.net> on 2002/10/30 01:47:24 UTC

struts.Validator odd behavior

Hi All,
I am baffled. 

Case 1: Given the struts-config below and having the validate method in
the itemForm class (which extends ValidatorForm) , itemForm validates
correctly. However when I call it with
http://localhost:8081/Item.do?year=2002&month=10&day=7 although it
validates correctly it doesn't perform the logic in the execute() of
ItemAction. No beans are updated nor are the logging outputs performed.

Case 2: If I remove the validate method from itemForm, the logic of
ItemAction.execute() is performed (beans created and logs logged)
however the validation is no longer done and the page is just forwarded
to 'item'

Case 3: If I then remove the input parameter from the action (in and
attempt to make it use the execute() logic) with the validate method
still removed from the actionForm I get an error

	No input attribute for mapping path /Item
	description The server encountered an internal 
	error (No input attribute for mapping path /Item) 
	that prevented it from fulfilling this request.

I apologize if this is very convoluted. I have been struggling with this
for two days and finally come up with the causes and effects. However I
am stumped as to the reason or the solution. I am new to using struts so
I may be missing something basic. I am using Struts 1.1b2. Thank you in
advance for any help you may provide.

Robert

-----------------------------------------------------------------

	<action
            path="/Item"
            type="com.cosmetto.calendar.ItemAction"
            name="itemForm"
            input='/pages/item.jsp'
            />
 	<forward
            name="item"
            path="/pages/item.jsp"/>

  	<form-bean
            name="itemForm"
            type="com.cosmetto.calendar.ItemForm"/>

public ActionErrors validate(ActionMapping mapping,
  javax.servlet.http.HttpServletRequest request){
      return null;
  }



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>