You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Theodosios Paschalidis <th...@hotmail.com> on 2004/03/19 19:23:29 UTC
Dummy ActionForms?
Hi all,
I am trying to execute an Action using only a dummy form (empty). I have
successfully used this in other occasions but it seems to fail now.
In my config I have
<form-beans>
<form-bean name="closeOrderForm" type="app.CloseOrderForm" />
</form-beans>
<!-- CLOSE ORDER -->
<action path="/DoCloseOrder" type="app.CloseOrderAction"
name="closeOrderForm" scope="request" validate="false"
input="/DisOrderDetail.jsp">
<forward name="success" path="/FindOrder.jsp" />
</action>
<action path="/FindOrder" type="org.apache.struts.actions.ForwardAction"
parameter="/FindOrder.jsp" />
But I get this exception thrown:
java.lang.ClassCastException
at app.CloseOrderAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:446)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
I though it might have been the Input that messed things so i changed that
as follows with no luck.
I am getting frustrated over this, am I missing something? I would be
gratefull is somebody could give a hint on what the problem might be.
Thank you for your time,
Theo
<!-- CLOSE ORDER -->
<action path="/DoCloseOrder" type="app.CloseOrderAction"
name="closeOrderForm">
<forward name="success" path="/FindOrder.jsp" />
<forward name="exception" path="/Exception.jsp" />
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Dummy ActionForms?
Posted by Theodosios Paschalidis <th...@hotmail.com>.
Thanks for your reply Blake.
That tag read <html:form action="/DoCloseOrder">
Thank you Hubert!
You were correct I was doing a "session.getAttribute()" of an object, and
was casting it into a String! I thought it was just a String attribute. (I
will be changing my naming convention to make this dinstiction!)
Thanks for the heads up, I appreciate it.
----- Original Message -----
From: "Hubert Rabago" <ja...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, March 19, 2004 6:39 PM
Subject: Re: Dummy ActionForms?
> The ClassCastException is in your Action code, so check your code and see
> what you're casting. Post the code so others can see, too.
>
> --- Theodosios Paschalidis <th...@hotmail.com> wrote:
> > Hi all,
> >
> > I am trying to execute an Action using only a dummy form (empty). I have
> > successfully used this in other occasions but it seems to fail now.
> > In my config I have
> > <form-beans>
> > <form-bean name="closeOrderForm" type="app.CloseOrderForm" />
> > </form-beans>
> >
> > <!-- CLOSE ORDER -->
> > <action path="/DoCloseOrder" type="app.CloseOrderAction"
> > name="closeOrderForm" scope="request" validate="false"
> > input="/DisOrderDetail.jsp">
> > <forward name="success" path="/FindOrder.jsp" />
> > </action>
> > <action path="/FindOrder" type="org.apache.struts.actions.ForwardAction"
> > parameter="/FindOrder.jsp" />
> > But I get this exception thrown:
> >
> > java.lang.ClassCastException
> > at app.CloseOrderAction.execute(Unknown Source)
> > at
> >
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
> > sor.java:446)
> > at
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
> >
> > I though it might have been the Input that messed things so i changed
that
> > as follows with no luck.
> >
> > I am getting frustrated over this, am I missing something? I would be
> > gratefull is somebody could give a hint on what the problem might be.
> >
> > Thank you for your time,
> > Theo
> >
> > <!-- CLOSE ORDER -->
> > <action path="/DoCloseOrder" type="app.CloseOrderAction"
> > name="closeOrderForm">
> > <forward name="success" path="/FindOrder.jsp" />
> > <forward name="exception" path="/Exception.jsp" />
> > </action>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Dummy ActionForms?
Posted by Hubert Rabago <ja...@yahoo.com>.
The ClassCastException is in your Action code, so check your code and see
what you're casting. Post the code so others can see, too.
--- Theodosios Paschalidis <th...@hotmail.com> wrote:
> Hi all,
>
> I am trying to execute an Action using only a dummy form (empty). I have
> successfully used this in other occasions but it seems to fail now.
> In my config I have
> <form-beans>
> <form-bean name="closeOrderForm" type="app.CloseOrderForm" />
> </form-beans>
>
> <!-- CLOSE ORDER -->
> <action path="/DoCloseOrder" type="app.CloseOrderAction"
> name="closeOrderForm" scope="request" validate="false"
> input="/DisOrderDetail.jsp">
> <forward name="success" path="/FindOrder.jsp" />
> </action>
> <action path="/FindOrder" type="org.apache.struts.actions.ForwardAction"
> parameter="/FindOrder.jsp" />
> But I get this exception thrown:
>
> java.lang.ClassCastException
> at app.CloseOrderAction.execute(Unknown Source)
> at
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
> sor.java:446)
> at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
>
> I though it might have been the Input that messed things so i changed that
> as follows with no luck.
>
> I am getting frustrated over this, am I missing something? I would be
> gratefull is somebody could give a hint on what the problem might be.
>
> Thank you for your time,
> Theo
>
> <!-- CLOSE ORDER -->
> <action path="/DoCloseOrder" type="app.CloseOrderAction"
> name="closeOrderForm">
> <forward name="success" path="/FindOrder.jsp" />
> <forward name="exception" path="/Exception.jsp" />
> </action>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Dummy ActionForms?
Posted by Blake Whitmore <bl...@yahoo.com>.
I'm guessing your DisOrderDetail.jsp's <html:form..>
tag is wrong. Check the mapping there.
--- Theodosios Paschalidis <th...@hotmail.com>
wrote:
> Hi all,
>
> I am trying to execute an Action using only a dummy
> form (empty). I have
> successfully used this in other occasions but it
> seems to fail now.
> In my config I have
> <form-beans>
> <form-bean name="closeOrderForm"
> type="app.CloseOrderForm" />
> </form-beans>
>
> <!-- CLOSE ORDER -->
> <action path="/DoCloseOrder"
> type="app.CloseOrderAction"
> name="closeOrderForm" scope="request"
> validate="false"
> input="/DisOrderDetail.jsp">
> <forward name="success" path="/FindOrder.jsp" />
> </action>
> <action path="/FindOrder"
> type="org.apache.struts.actions.ForwardAction"
> parameter="/FindOrder.jsp" />
> But I get this exception thrown:
>
> java.lang.ClassCastException
> at app.CloseOrderAction.execute(Unknown Source)
> at
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
> sor.java:446)
> at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
>
> I though it might have been the Input that messed
> things so i changed that
> as follows with no luck.
>
> I am getting frustrated over this, am I missing
> something? I would be
> gratefull is somebody could give a hint on what the
> problem might be.
>
> Thank you for your time,
> Theo
>
> <!-- CLOSE ORDER -->
> <action path="/DoCloseOrder"
> type="app.CloseOrderAction"
> name="closeOrderForm">
> <forward name="success" path="/FindOrder.jsp" />
> <forward name="exception" path="/Exception.jsp"
> />
> </action>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org