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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dummy ActionForms?
I'm guessing your DisOrderDetail.jsp's html:form.. tag is wrong. Check the mapping there. --- Theodosios Paschalidis [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dummy ActionForms?
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]