hi ...
please find attached the form-bean.
and find below the log-dump
the line starting with _form: should display
form.getClass().getName()
thanks
Do Mai 16 12:42:37 CEST 2002:<I> <WebLogicServer> WebLogic Server started
Do Mai 16 12:42:48 CEST 2002:<I> <NT Performance Pack> Allocating: '2'
NT reader
threads
Do Mai 16 12:42:49 CEST 2002:<I> <WebAppServletContext-det> FlowManager:
init
Do Mai 16 12:42:51 CEST 2002:<E> <WebAppServletContext-det> FlowManager:
Error c
reating ActionForm instance of class
'de.jamba.b2b.tmotion.action.web.MyActionFo
rm'
java.lang.ClassCastException: de.jamba.b2b.tmotion.action.web.MyActionForm
at de.jamba.controller.web.FlowManager.processActionForm(Unknown
Source)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:141
2)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:463)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:106)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(Unknown So
urce)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(Unknown So
urce)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
ContextManager.java:252)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Unknown Source)
at weblogic.socket.MuxableSocketHTTP.execute(Unknown Source)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
_form:
Do Mai 16 12:42:51 CEST 2002:<E> <WebAppServletContext-det> Servlet
failed with
Exception
Nicolas De Loof wrote:
>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]>
>
>
/**
* File: BuyProductForm.java
* System: Jamba! Plattform
* Module: Product (de.jamba.product)
* Description: Form bean associated to the BuyProductAction.
* Preconditions:
* Copyright: Jamba! AG
* Source: $Source:
/var/cvs/core-001/src/de/jamba/product/action/web/BuyProductForm.java,v $
* Author: $Author: bfinder $
* Date: $Date: 2001/12/13 13:02:54 $
* Version: $Revision: 1.41 $
*
*/
package de.jamba.b2b.tmotion.action.web;
import java.util.*;
import java.io.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
public class MyActionForm extends ActionForm {
private String param1;
public String getParam1(){
return param1;
}
public void setParam1(String param){
this.param1=param;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>