Could you please insert in your action class the line :

System.out.println(form.getClass().getName());
(or another logging method)

so we can have more infos about what's happening with your form ?

and please give us the complete java source code of your FormBean as
attachement

Nico


> Im shure....
>
> entry in struts-config
> ===============
> <form-bean     name="SimpleForm"
>              type="de.jamba.b2b.tmotion.action.web.MyActionForm"/>
>
> <action    path="/action"
>                type="de.jamba.b2b.tmotion.action.web.StrutsAction"
>                name="SimpleForm"
>                scope="request"
>                validate="false">
>
>
>         <forward name="forward"    path="/test.jsp" />
>
>
> form - bean
> ==========
> public class MyActionForm extends ActionForm {
>
>    private String param1;
>      public String getParam1(){
>        return param1;
>    }
>      public void setParam1(String param){
>        this.param1=param;
>    }
>
>
> }
>
> action
> =====
>
> public class StrutsAction extends Action{
>
>    public StrutsAction() {
>    }
>
>    public ActionForward perform(ActionMapping mapping,
>                 ActionForm form,
>                 HttpServletRequest request,
>                 HttpServletResponse response)
>           throws IOException, ServletException
>    {
>      MyActionForm myActionForm = (MyActionForm) form;
>      myActionForm.setParam1("_new value");
>          return mapping.findForward("forward");
>    }
>
> }
>
>
> When connecting to the action (action.do) I get a class cast
> exception......
> and I dont know why..
>
> any help would be appreciated...
>
> Erich Meier wrote:
>
> >On Thu, May 16, 2002 at 11:13:17AM +0200, Thorsten Maus wrote:
> >
> >
> >>Hi there...
> >>
> >>I posted a question on a class cast exception yesterday....and Im not
> >>getting any further..
> >>
> >>I give you the important code on the next lines...and hopefully your
> >>able to help me
> >>
> >>
> >>
> >[...]
> >
> >
> >>form - bean
> >>==========
> >>public class MyActionForm extends ActionForm {
> >>
> >>
> >
> >Are you sure, that this ActionForm class is the
> >org.apache.struts.action.ActionForm class? Or did you define your own
ActionForm
> >class that is not derived from the struts one?
> >
> >The rest looks correct.
> >
> >
> >
> >>(** have seen starwars this night ... **)
> >>
> >>
> >
> >Is it worth it?
> >
> >Regards,
> >Erich
> >
> >
> >
>
>
>
>
> --
> 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