Hmm.... This sound like it is the way 1.0 of struts was implemented.  I
haven't use 1.0 for quite sometime so I don't remember.  But, there is
something you can do.  You can set the attribute validate=false, so that the
controller don't have to call the validate method on your from bean.  You
Don't have to implement the validate method on your from bean, but if you do
return null or empty actionErrors.  As for input, I don't think you need to
provide one.

Sorry if I didn't help you in anyway....:)

Danny

Ps. Move to 1.1....

-----Original Message-----
From: Darren McGuinness [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 30, 2002 9:24 AM
To: Struts Users Mailing List
Subject: Re: action mapping question


1) I dont need a logoff form, but if i dont have one then i get errors of
type: form bean null.....
2) 1.0

"Trieu, Danny" wrote:

> 1) why would you need a logoff form?
> 2) what version of struts are you using?
>
> You don't have to have a form bean declare for an action mapping.  The 
> reason it throw the exception Because you have the input attribute 
> setting.  With this setting the controller makes assumsion that your 
> mapping has a from bean associate to it and make call to the validate 
> methods.  I guess the solution is not to provide from bean mapping and 
> input mapping for your action.
>
> danny
>
> -----Original Message-----
> From: Darren McGuinness [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: action mapping question
>
> Hi,
>
> Having a few problems getting my application working properly. 
> Basically I've got a logon.jsp page which posts to logon.do action, 
> which then validates and if successfull outputs search.jsp (shows in 
> the browser as /logon.do ).
>
> then on search.jsp i have 2 forms, one to search.do and one to 
> logoff.do
>
> here's my action mapping for logoff:
>
>   <action   path="/logoff"
>               type="struts1.action.LogoffAction"
>               name="logoffForm"
>               input="/logon.do"
>               scope="request">
>             <forward name="success" path="/logon.jsp"/>
>             <forward name="failure" path="/logon.jsp"/>
>     </action>
>
> first of all, i dont want to use a bean for the logoff action but it 
> complains otherwise, so for now i've used a form with a attribute 
> dummy with get/set/reset/validate  methods....is there a way not to 
> have to do this? if i dont have a form, I get an exception complaining 
> the form bean is null.....
>
> second, what should 'input' be? if i leave it as "/logon.do" then it 
> works, but also if i put it as "/tapssearch.jsp" it works......so what 
> should it be? and how can i set action-mapping to accept input from 
> any page, seeing as for example i'll want to be able to log-off from 
> any one of the pages(bar the logon one of course!) So that i dont have 
> to write an action mapping for every page that has a logoff form....
>
> cheers
>
> --
> To unsubscribe, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to