RE: LookupDispatchAction problem
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > "Request[/uploadDocument] does not contain handler parameter named > submit" > i really don't know why this error appears. [I'm currently trying to convince the spam filter to cough up all the messages it quarantined since 3pm yesterday, so this may have already been answered, but...] It's saying that there is no request parameter named "submit". What does the HTML generated by the JSP look like? Can you list out all the request parameters and examine them? I wonder if the name is reserved? I think you'll have trouble later if you need to refer to the form element with JavaScript-- there is already a document.forms[0].submit(); function (method?) and you'll get errors if you ever try to say document.forms[0].submit.value="abc"; I suggest changing the name of the form element to 'method' as used in the LookupDispatchAction javadocs. Or, I've used 'mode' and 'userAction' with no problems. Anything but 'submit' (or any other HTML keyword). -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction problem
Hi out there, i've no idea why the following mechanisms doesn't work. I want to build a formular with 2 submit buttons. When i push one of the buttons the validation method of the suitable form bean validates the user input. It works fine if an an error occures. Then the user gets an error message. If the data is valid then i get the following error message. "Request[/uploadDocument] does not contain handler parameter named submit" i really don't know why this error appears. i've searched the archives the whole day but found nothing that solves my problem. THE ARCHITECTURE: # A JSP page with a formular. The formular contains two submit buttons. . . # A lookupDispatchAction like this: public class DomUploadAction extends LookupDispatchAction{ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("profile.dom.upload.label.addMetaData", "addMetaData"); map.put("profile.dom.upload.label.changeMetaData", "modifyMetaData"); map.put("profile.dom.upload.label.sendDoc", "uploadData"); return map; } ... Here the methods addMetaData, modifyMetaData, uploadData ... } # the configuration files says I think the form bean is not so interesting at this point ! Please give a hint (Maybe i'm to blind) THX - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction problem
Wendy Smoak wrote: In addition, the 'myaction' request parameter should be set to whatever the value of button.search is in ApplicationResources.properties. ApplicationResources.properties: button.search=ClickHere Thank you. This solved my problem :-) The entry was missing from my ApplicationResources.properties file (maybe the faq on the subject, should be more specific wrt. updating the properties file). Regards Soeren Hjarlvig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction problem
> From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] > The error message indicates that you are missing a > button.search entry in > your Application Resources file. Earlier, Søren wrote: > > http://localhost:8080/fonde/administrator.do?myaction=button.search In addition, the 'myaction' request parameter should be set to whatever the value of button.search is in ApplicationResources.properties. ApplicationResources.properties: button.search=ClickHere getKeyMethodMap: map.put("button.search", "search"); Then you have a button or a link that causes this: ?myaction=ClickHere Now clicking on that button/link will cause the 'search' method to be executed. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction problem
Søren, The error message indicates that you are missing a button.search entry in your Application Resources file. -Richard -Original Message- From: Søren Hjarlvig [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 2:13 PM To: [EMAIL PROTECTED] Subject: LookupDispatchAction problem I'm following Ted's tip (http://husted.com/struts/tips/003.html) but I can't get to work: With the newest nightly build I'm getting the following error: 500 Servlet Exception javax.servlet.ServletException: Action[/administrator] missing resource 'button.search' in key method map at org.apache.struts.actions.LookupDispatchAction.getLookupMapName(LookupDispat chAction.java:283) at org.apache.struts.actions.LookupDispatchAction.getMethodName(LookupDispatchA ction.java:324) at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction. java:201) The form: ... button.search ... ... The resulting request: http://localhost:8080/fonde/administrator.do?myaction=button.search struts-config.xml: ... ... AdministratorAction: public class AdministratorAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.search", "search"); System.out.println((String)map.get("button.search")); return map; } public ActionForward search(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) { ... return mapping.findForward("admSearchDone"); } } The println() writes "search" on the console, so I know that the getKeyMethodMap()-method is invoked and the mapping should be ok. So why can't it find my search-method? The 1.1 release build also fails, but with another error message (this is probably due to bug 21226 (http://issues.apache.org/bugzilla/show_bug.cgi?id=21226)). Best regards Soeren Hjarlvig - 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]
LookupDispatchAction problem
I'm following Ted's tip (http://husted.com/struts/tips/003.html) but I can't get to work: With the newest nightly build I'm getting the following error: 500 Servlet Exception javax.servlet.ServletException: Action[/administrator] missing resource 'button.search' in key method map at org.apache.struts.actions.LookupDispatchAction.getLookupMapName(LookupDispatchAction.java:283) at org.apache.struts.actions.LookupDispatchAction.getMethodName(LookupDispatchAction.java:324) at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:201) The form: ... button.search ... ... The resulting request: http://localhost:8080/fonde/administrator.do?myaction=button.search struts-config.xml: ... ... AdministratorAction: public class AdministratorAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.search", "search"); System.out.println((String)map.get("button.search")); return map; } public ActionForward search(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) { ... return mapping.findForward("admSearchDone"); } } The println() writes "search" on the console, so I know that the getKeyMethodMap()-method is invoked and the mapping should be ok. So why can't it find my search-method? The 1.1 release build also fails, but with another error message (this is probably due to bug 21226 (http://issues.apache.org/bugzilla/show_bug.cgi?id=21226)). Best regards Soeren Hjarlvig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction problem
thanks > -Original Message- > From: Jason Lea [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 6:14 PM > To: Struts Users Mailing List > Subject: Re: LookupDispatchAction problem > > Tim Clotworthy wrote: > > This is really a simple aside, but is there a way to have the text > > (label) of the button appear different that the value of the submit, and > > if so, how does one do it? Thanks. > > Yes and no. > > The HTML 4.0.1 standard allows you to specify a tag which does > this but IE doesn't support it properly. Mozilla supports it correctly > though. I have only checked with IE6 and Mozilla 1.3/1.4. > > The button tag can even include different styles and images on the button > eg > > this is a > button, click me > > Problems I found with IE's support of the button tag: > 1. The default type should be 'submit' from the standard, but IE treats > it as 'button' so it doesn't cause the form to submit. Fixed by adding > the type="submit" to the tag > > 2. (the problem that stops me using it) If you have more than 1 button > tag in your form all the button values will be included when the form > submits - which makes it useless. > > Eg if i have the following buttons: > > update me > delete me > > I click the 'update me' button, IE will submit the following values > method=update&method=delete, when it should only send method=update. > > check out the spec here: > http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON > > --Jason Lea > > > > > >>-Original Message- > >>From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > >>Sent: Wednesday, July 23, 2003 5:07 PM > >>To: 'Struts Users Mailing List' > >>Subject: RE: LookupDispatchAction problem > >> > >>Thanks for all help. It is fixed now. God bless you, one and all. > >> > >> > >>>-Original Message- > >>>From: Suzette Daniel [mailto:[EMAIL PROTECTED] > >>>Sent: Wednesday, July 23, 2003 5:01 PM > >>>To: 'Struts Users Mailing List' > >>>Subject: RE: LookupDispatchAction problem > >>> > >>>No prob, here you go: > >>> > >>> >>>scope="application"> > >>>ERROR: Application resources not loaded -- check servlet > >> > >>container > >> > >>>logs for error messages. > >>> > >>> > >>>Suzette > >>> > >>>-Original Message- > >>>From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > >>>Sent: Wednesday, July 23, 2003 5:00 PM > >>>To: 'Struts Users Mailing List' > >>>Subject: RE: LookupDispatchAction problem > >>> > >>> > >>>Thanks, but I switch it to method, and same error occurs. > >>> > >>>Again, I wonder if my problem is related to my resource bundle, not > >> > >>being > >> > >>>able to find it, etc. How can I simply diagnose that the tag > >> > >> >> > >>>key="button.add" /> is being processed properly by the ActionServlet > >>>(value > >>>being found, etc.). thanks. Sorry for this going on-and-on. Who > >> > >>knew... > >> > >>> > >>> > >>>>-Original Message- > >>>>From: Suzette Daniel [mailto:[EMAIL PROTECTED] > >>>>Sent: Wednesday, July 23, 2003 4:43 PM > >>>>To: 'Struts Users Mailing List' > >>>>Subject: RE: LookupDispatchAction problem > >>>> > >>>>I received the same error, so I switched to using my own property > >>> > >>>"method" > >>> > >>>>and if fixed that error. > >>>> > >>>>JSP: > >>>> >>>>titleKey="verify.order.add.another.button.title"> > >>>> > >>>> > >>>> > >>>>>Struts-config: > >>>>> .. > >>>>> >>>>>input="/pages/verifyorder.jsp" parameter="method" > >>>>>type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > >>>>>scope="session"> > >>>> > >>>>Suzette > >>>> > >>>>-Original Message- > >>>>From: Tim Clotworthy
RE: LookupDispatchAction problem
Ok. Thanks. > -Original Message- > From: Michael Ruppin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 5:53 PM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: RE: LookupDispatchAction problem > > Great question. You don't, which is why I did my own > dispatch Action which works off the existence of a > parameters in the request, not their value. In other > words, I made a different form property for each type > of submission, and I check which are non-null. > Otherwise, you can't have two buttons with the same > label on a page, and translation of your messages > could cause methods to be unreachable. > > There are other alternatives, if JavaScript is an > option for you. For me, it is not. Another > possibility is to have many HTML forms, one for each > submission, and put the method="foo" into a hidden. > This is not always possible, if you need nesting. > > m > > --- Tim Clotworthy <[EMAIL PROTECTED]> wrote: > > This is really a simple aside, but is there a way to > > have the text > > (label) of the button appear different that the > > value of the submit, and > > if so, how does one do it? Thanks. > > > > > -Original Message- > > > From: Tim Clotworthy > > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:07 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > Thanks for all help. It is fixed now. God bless > > you, one and all. > > > > > > > -Original Message- > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 5:01 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > No prob, here you go: > > > > > > > > > name="org.apache.struts.action.MESSAGE" > > > > scope="application"> > > > > ERROR: Application resources not loaded -- > > check servlet > > > container > > > > logs for error messages. > > > > > > > > > > > > Suzette > > > > > > > > -Original Message- > > > > From: Tim Clotworthy > > [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 5:00 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > > > Thanks, but I switch it to method, and same > > error occurs. > > > > > > > > Again, I wonder if my problem is related to my > > resource bundle, not > > > being > > > > able to find it, etc. How can I simply diagnose > > that the tag > > > > > > key="button.add" /> is being processed properly > > by the ActionServlet > > > > (value > > > > being found, etc.). thanks. Sorry for this going > > on-and-on. Who > > > knew... > > > > > > > > > > > > > > > > > -Original Message- > > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > > Sent: Wednesday, July 23, 2003 4:43 PM > > > > > To: 'Struts Users Mailing List' > > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > I received the same error, so I switched to > > using my own property > > > > "method" > > > > > and if fixed that error. > > > > > > > > > > JSP: > > > > >> > > > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > > > > > > > > > > > > > > Struts-config: > > > > > > .. > > > > > > > name="monitorInfoForm" > > > > > > input="/pages/verifyorder.jsp" > > parameter="method" > > > > > > > > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > > > > > scope="session"> > > > > > > > > > > Suzette > > > > > > > > > > -Original Message- > > > > > From: Tim Clotworthy > > [mailto:[EMAIL PROTECTED] > > > > > Sent: Wednesday, July 23,
RE: LookupDispatchAction problem
Thanks. > -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 6:07 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > You could try using an image button: > > > > In props file: > image.submit=/images/submit.gif > > Suzette H. Daniel > Java Developer/Web dept > 770 416.9222 ex: 5041 > > > > -Original Message- > From: Michael Ruppin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 5:53 PM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: RE: LookupDispatchAction problem > > > Great question. You don't, which is why I did my own > dispatch Action which works off the existence of a > parameters in the request, not their value. In other > words, I made a different form property for each type > of submission, and I check which are non-null. > Otherwise, you can't have two buttons with the same > label on a page, and translation of your messages > could cause methods to be unreachable. > > There are other alternatives, if JavaScript is an > option for you. For me, it is not. Another > possibility is to have many HTML forms, one for each submission, and put > the > method="foo" into a hidden. > This is not always possible, if you need nesting. > > m > > --- Tim Clotworthy <[EMAIL PROTECTED]> wrote: > > This is really a simple aside, but is there a way to > > have the text > > (label) of the button appear different that the > > value of the submit, and > > if so, how does one do it? Thanks. > > > > > -Original Message- > > > From: Tim Clotworthy > > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:07 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > Thanks for all help. It is fixed now. God bless > > you, one and all. > > > > > > > -Original Message- > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 5:01 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > No prob, here you go: > > > > > > > > > name="org.apache.struts.action.MESSAGE" > > > > scope="application"> > > > > ERROR: Application resources not loaded -- > > check servlet > > > container > > > > logs for error messages. > > > > > > > > > > > > Suzette > > > > > > > > -Original Message- > > > > From: Tim Clotworthy > > [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 5:00 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > > > Thanks, but I switch it to method, and same > > error occurs. > > > > > > > > Again, I wonder if my problem is related to my > > resource bundle, not > > > being > > > > able to find it, etc. How can I simply diagnose > > that the tag > > > > > > key="button.add" /> is being processed properly > > by the ActionServlet > > > > (value > > > > being found, etc.). thanks. Sorry for this going > > on-and-on. Who > > > knew... > > > > > > > > > > > > > > > > > -Original Message- > > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > > Sent: Wednesday, July 23, 2003 4:43 PM > > > > > To: 'Struts Users Mailing List' > > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > I received the same error, so I switched to > > using my own property > > > > "method" > > > > > and if fixed that error. > > > > > > > > > > JSP: > > > > >> > > > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > > > > > > > > > > > > > > Struts-config: > > > > > > .. > > > > > > > name="monitorInfoForm" > > > > > > input="/pages/verifyorder.jsp" > > par
Re: LookupDispatchAction problem
Tim Clotworthy wrote: This is really a simple aside, but is there a way to have the text (label) of the button appear different that the value of the submit, and if so, how does one do it? Thanks. Yes and no. The HTML 4.0.1 standard allows you to specify a tag which does this but IE doesn't support it properly. Mozilla supports it correctly though. I have only checked with IE6 and Mozilla 1.3/1.4. The button tag can even include different styles and images on the button eg this is a button, click me Problems I found with IE's support of the button tag: 1. The default type should be 'submit' from the standard, but IE treats it as 'button' so it doesn't cause the form to submit. Fixed by adding the type="submit" to the tag 2. (the problem that stops me using it) If you have more than 1 button tag in your form all the button values will be included when the form submits - which makes it useless. Eg if i have the following buttons: update me delete me I click the 'update me' button, IE will submit the following values method=update&method=delete, when it should only send method=update. check out the spec here: http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON --Jason Lea -Original Message- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 5:07 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks for all help. It is fixed now. God bless you, one and all. -Original Message- From: Suzette Daniel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 5:01 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem No prob, here you go: ERROR: Application resources not loaded -- check servlet container logs for error messages. Suzette -Original Message- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 5:00 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks, but I switch it to method, and same error occurs. Again, I wonder if my problem is related to my resource bundle, not being able to find it, etc. How can I simply diagnose that the tag key="button.add" /> is being processed properly by the ActionServlet (value being found, etc.). thanks. Sorry for this going on-and-on. Who knew... -Original Message- From: Suzette Daniel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:43 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem I received the same error, so I switched to using my own property "method" and if fixed that error. JSP: Struts-config: .. Suzette -Original Message- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:40 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks to all earnest responses. I still have a problem, but it has evolved a little. I have simplified the syntax (using husted tip 003), so that my jsp has: (as he suggested, using the default name of submit that corresponds to the tag, and in my struts-config, I now have: type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc tion" name="SupportOrgForm" parameter="submit"> and in my action I have: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.selectOrgs", "selectOrgs"); return map; } But alas, I am still getting an error (below). I wonder if my resource bundled is not being read properly, because the button on the form appears with the tag syntax "something is wrong), rather than the value from the properties file. How can I check that the property button.selectOrgs is being found in the resource bundle, or, for that matter, that the resource bundle is being found at all? Thanks so much to all. javax.servlet.ServletException: Request[/SupportOrgDispatchAction] does not contain handler parameter named submit at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:199) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:480) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt e
RE: LookupDispatchAction problem
You could try using an image button: In props file: image.submit=/images/submit.gif Suzette H. Daniel Java Developer/Web dept 770 416.9222 ex: 5041 -Original Message- From: Michael Ruppin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 5:53 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: LookupDispatchAction problem Great question. You don't, which is why I did my own dispatch Action which works off the existence of a parameters in the request, not their value. In other words, I made a different form property for each type of submission, and I check which are non-null. Otherwise, you can't have two buttons with the same label on a page, and translation of your messages could cause methods to be unreachable. There are other alternatives, if JavaScript is an option for you. For me, it is not. Another possibility is to have many HTML forms, one for each submission, and put the method="foo" into a hidden. This is not always possible, if you need nesting. m --- Tim Clotworthy <[EMAIL PROTECTED]> wrote: > This is really a simple aside, but is there a way to > have the text > (label) of the button appear different that the > value of the submit, and > if so, how does one do it? Thanks. > > > -Original Message- > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 5:07 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > Thanks for all help. It is fixed now. God bless > you, one and all. > > > > > -Original Message- > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:01 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > No prob, here you go: > > > > > > name="org.apache.struts.action.MESSAGE" > > > scope="application"> > > > ERROR: Application resources not loaded -- > check servlet > > container > > > logs for error messages. > > > > > > > > > Suzette > > > > > > -Original Message- > > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:00 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > Thanks, but I switch it to method, and same > error occurs. > > > > > > Again, I wonder if my problem is related to my > resource bundle, not > > being > > > able to find it, etc. How can I simply diagnose > that the tag > > > > key="button.add" /> is being processed properly > by the ActionServlet > > > (value > > > being found, etc.). thanks. Sorry for this going > on-and-on. Who > > knew... > > > > > > > > > > > > > -Original Message- > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 4:43 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > I received the same error, so I switched to > using my own property > > > "method" > > > > and if fixed that error. > > > > > > > > JSP: > > > > > > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > > > > > > > > > > Struts-config: > > > > > .. > > > > > name="monitorInfoForm" > > > > > input="/pages/verifyorder.jsp" > parameter="method" > > > > > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > > > > scope="session"> > > > > > > > > Suzette > > > > > > > > -Original Message- > > > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 4:40 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > > > Thanks to all earnest responses. I still have > a problem, but it > has > > > > evolved a little. I have simplified the syntax > (using husted tip > > 003), > > > > so that > > > my > > > &
RE: LookupDispatchAction problem
Great question. You don't, which is why I did my own dispatch Action which works off the existence of a parameters in the request, not their value. In other words, I made a different form property for each type of submission, and I check which are non-null. Otherwise, you can't have two buttons with the same label on a page, and translation of your messages could cause methods to be unreachable. There are other alternatives, if JavaScript is an option for you. For me, it is not. Another possibility is to have many HTML forms, one for each submission, and put the method="foo" into a hidden. This is not always possible, if you need nesting. m --- Tim Clotworthy <[EMAIL PROTECTED]> wrote: > This is really a simple aside, but is there a way to > have the text > (label) of the button appear different that the > value of the submit, and > if so, how does one do it? Thanks. > > > -Original Message- > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 5:07 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > Thanks for all help. It is fixed now. God bless > you, one and all. > > > > > -Original Message- > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:01 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > No prob, here you go: > > > > > > name="org.apache.struts.action.MESSAGE" > > > scope="application"> > > > ERROR: Application resources not loaded -- > check servlet > > container > > > logs for error messages. > > > > > > > > > Suzette > > > > > > -Original Message- > > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 5:00 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > Thanks, but I switch it to method, and same > error occurs. > > > > > > Again, I wonder if my problem is related to my > resource bundle, not > > being > > > able to find it, etc. How can I simply diagnose > that the tag > > > > key="button.add" /> is being processed properly > by the ActionServlet > > > (value > > > being found, etc.). thanks. Sorry for this going > on-and-on. Who > > knew... > > > > > > > > > > > > > -Original Message- > > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 4:43 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > I received the same error, so I switched to > using my own property > > > "method" > > > > and if fixed that error. > > > > > > > > JSP: > > > > > > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > > > > > > > > > > Struts-config: > > > > > .. > > > > > name="monitorInfoForm" > > > > > input="/pages/verifyorder.jsp" > parameter="method" > > > > > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > > > > scope="session"> > > > > > > > > Suzette > > > > > > > > -Original Message- > > > > From: Tim Clotworthy > [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, July 23, 2003 4:40 PM > > > > To: 'Struts Users Mailing List' > > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > > > > Thanks to all earnest responses. I still have > a problem, but it > has > > > > evolved a little. I have simplified the syntax > (using husted tip > > 003), > > > > so that > > > my > > > > jsp has: > > > > > > > > > > > > > > > > > > > > > > > > (as he suggested, using the default name of > submit that > corresponds > > to > > > the > > > > tag, and in my struts-config, I > now have: >
RE: LookupDispatchAction problem
This is really a simple aside, but is there a way to have the text (label) of the button appear different that the value of the submit, and if so, how does one do it? Thanks. > -Original Message- > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 5:07 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > Thanks for all help. It is fixed now. God bless you, one and all. > > > -Original Message- > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 5:01 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > No prob, here you go: > > > > > scope="application"> > > ERROR: Application resources not loaded -- check servlet > container > > logs for error messages. > > > > > > Suzette > > > > -Original Message- > > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 5:00 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > > > Thanks, but I switch it to method, and same error occurs. > > > > Again, I wonder if my problem is related to my resource bundle, not > being > > able to find it, etc. How can I simply diagnose that the tag > > key="button.add" /> is being processed properly by the ActionServlet > > (value > > being found, etc.). thanks. Sorry for this going on-and-on. Who > knew... > > > > > > > > > -Original Message- > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 4:43 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > I received the same error, so I switched to using my own property > > "method" > > > and if fixed that error. > > > > > > JSP: > > >> > titleKey="verify.order.add.another.button.title"> > > > > > > > > > > > > > Struts-config: > > > > .. > > > > > > > input="/pages/verifyorder.jsp" parameter="method" > > > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > > > scope="session"> > > > > > > Suzette > > > > > > -Original Message- > > > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 23, 2003 4:40 PM > > > To: 'Struts Users Mailing List' > > > Subject: RE: LookupDispatchAction problem > > > > > > > > > Thanks to all earnest responses. I still have a problem, but it has > > > evolved a little. I have simplified the syntax (using husted tip > 003), > > > so that > > my > > > jsp has: > > > > > > > > > > > > > > > > > > (as he suggested, using the default name of submit that corresponds > to > > the > > > tag, and in my struts-config, I now have: > > > > > > > > > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc > > > tion" name="SupportOrgForm" parameter="submit"> > > > > > > > > > > > > and in my action I have: > > > > > > protected Map getKeyMethodMap() { > > > > > > Map map = new HashMap(); > > > map.put("button.selectOrgs", "selectOrgs"); > > > return map; > > > } > > > > > > > > > But alas, I am still getting an error (below). I wonder if my > resource > > > bundled is not being read properly, because the button on the form > > appears > > > with the tag syntax " something > > is > > > wrong), rather than the value from the properties file. How can I > > check > > > that > > > the property button.selectOrgs is being found in the resource > bundle, > > or, > > > for that matter, that the resource bundle is being found at all? > > > > > > > > > Thanks so much to all. > > > > > > javax.servlet.ServletException: Request[/SupportOrgDispatchAction] > > does > > > not > > > contain handler parameter named submit > > > at > > > > > > org.apache.struts.actions.LookupDispat
RE: LookupDispatchAction problem
Thanks for all help. It is fixed now. God bless you, one and all. > -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 5:01 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > No prob, here you go: > > scope="application"> > ERROR: Application resources not loaded -- check servlet container > logs for error messages. > > > Suzette > > -Original Message- > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 5:00 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > > Thanks, but I switch it to method, and same error occurs. > > Again, I wonder if my problem is related to my resource bundle, not being > able to find it, etc. How can I simply diagnose that the tag key="button.add" /> is being processed properly by the ActionServlet > (value > being found, etc.). thanks. Sorry for this going on-and-on. Who knew... > > > > > -Original Message- > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 4:43 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > I received the same error, so I switched to using my own property > "method" > > and if fixed that error. > > > > JSP: > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > > Struts-config: > > > .. > > > > > input="/pages/verifyorder.jsp" parameter="method" > > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > > scope="session"> > > > > Suzette > > > > -Original Message- > > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 4:40 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > > > Thanks to all earnest responses. I still have a problem, but it has > > evolved a little. I have simplified the syntax (using husted tip 003), > > so that > my > > jsp has: > > > > > > > > > > > > (as he suggested, using the default name of submit that corresponds to > the > > tag, and in my struts-config, I now have: > > > > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc > > tion" name="SupportOrgForm" parameter="submit"> > > > > > > > > and in my action I have: > > > > protected Map getKeyMethodMap() { > > > > Map map = new HashMap(); > > map.put("button.selectOrgs", "selectOrgs"); > > return map; > > } > > > > > > But alas, I am still getting an error (below). I wonder if my resource > > bundled is not being read properly, because the button on the form > appears > > with the tag syntax " is > > wrong), rather than the value from the properties file. How can I > check > > that > > the property button.selectOrgs is being found in the resource bundle, > or, > > for that matter, that the resource bundle is being found at all? > > > > > > Thanks so much to all. > > > > javax.servlet.ServletException: Request[/SupportOrgDispatchAction] > does > > not > > contain handler parameter named submit > > at > > > org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct > > ion.java:199) > > at > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr > > ocessor.java:480) > > at > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: > > 274) > > at > > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) > > at > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica > > tionFilterChain.java:247) > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt > > erChain.java:193)...blah...blah > > > > > > > -Original Message- > > > From: Suzette Dan
RE: LookupDispatchAction problem
No prob, here you go: ERROR: Application resources not loaded -- check servlet container logs for error messages. Suzette -Original Message- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 5:00 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks, but I switch it to method, and same error occurs. Again, I wonder if my problem is related to my resource bundle, not being able to find it, etc. How can I simply diagnose that the tag is being processed properly by the ActionServlet (value being found, etc.). thanks. Sorry for this going on-and-on. Who knew... > -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:43 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > I received the same error, so I switched to using my own property "method" > and if fixed that error. > > JSP: >titleKey="verify.order.add.another.button.title"> > > > > > Struts-config: > > .. > > > input="/pages/verifyorder.jsp" parameter="method" > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > scope="session"> > > Suzette > > -Original Message- > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:40 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > > Thanks to all earnest responses. I still have a problem, but it has > evolved a little. I have simplified the syntax (using husted tip 003), > so that my > jsp has: > > > > > > (as he suggested, using the default name of submit that corresponds to the > tag, and in my struts-config, I now have: > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc > tion" name="SupportOrgForm" parameter="submit"> > > > > and in my action I have: > > protected Map getKeyMethodMap() { > > Map map = new HashMap(); > map.put("button.selectOrgs", "selectOrgs"); > return map; > } > > > But alas, I am still getting an error (below). I wonder if my resource > bundled is not being read properly, because the button on the form appears > with the tag syntax " wrong), rather than the value from the properties file. How can I check > that > the property button.selectOrgs is being found in the resource bundle, or, > for that matter, that the resource bundle is being found at all? > > > Thanks so much to all. > > javax.servlet.ServletException: Request[/SupportOrgDispatchAction] does > not > contain handler parameter named submit > at > org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct > ion.java:199) > at > org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr > ocessor.java:480) > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: > 274) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica > tionFilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt > erChain.java:193)...blah...blah > > > > -Original Message- > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 4:19 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > With LookupDispatch you don't have to use a hidden tag. I think the > > problem might be in your action itself. Look at Ted's > > tip(http://husted.com/struts/tips/003.html) and below is a working > sample. > > > > JSP: > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > Struts-config: > > .. > > > input="/pages/verifyorder.jsp" parameter="method" > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > scope="session"> > >path="/pages/choosemonitor.jsp"/> > > > > > > > > > > > > ACTIO
RE: LookupDispatchAction problem
Thanks, but I switch it to method, and same error occurs. Again, I wonder if my problem is related to my resource bundle, not being able to find it, etc. How can I simply diagnose that the tag is being processed properly by the ActionServlet (value being found, etc.). thanks. Sorry for this going on-and-on. Who knew... > -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:43 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > I received the same error, so I switched to using my own property "method" > and if fixed that error. > > JSP: > titleKey="verify.order.add.another.button.title"> > > > > > Struts-config: > > .. > > > input="/pages/verifyorder.jsp" parameter="method" > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > scope="session"> > > Suzette > > -----Original Message----- > From: Tim Clotworthy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:40 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > > Thanks to all earnest responses. I still have a problem, but it has > evolved > a little. I have simplified the syntax (using husted tip 003), so that my > jsp has: > > > > > > (as he suggested, using the default name of submit that corresponds to the > tag, and in my struts-config, I now have: > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc > tion" name="SupportOrgForm" parameter="submit"> > > > > and in my action I have: > > protected Map getKeyMethodMap() { > > Map map = new HashMap(); > map.put("button.selectOrgs", "selectOrgs"); > return map; > } > > > But alas, I am still getting an error (below). I wonder if my resource > bundled is not being read properly, because the button on the form appears > with the tag syntax " wrong), rather than the value from the properties file. How can I check > that > the property button.selectOrgs is being found in the resource bundle, or, > for that matter, that the resource bundle is being found at all? > > > Thanks so much to all. > > javax.servlet.ServletException: Request[/SupportOrgDispatchAction] does > not > contain handler parameter named submit > at > org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct > ion.java:199) > at > org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr > ocessor.java:480) > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: > 274) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica > tionFilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt > erChain.java:193)...blah...blah > > > > -Original Message- > > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 23, 2003 4:19 PM > > To: 'Struts Users Mailing List' > > Subject: RE: LookupDispatchAction problem > > > > With LookupDispatch you don't have to use a hidden tag. I think the > > problem might be in your action itself. Look at Ted's > > tip(http://husted.com/struts/tips/003.html) and below is a working > sample. > > > > JSP: > > > titleKey="verify.order.add.another.button.title"> > > > > > > > > Struts-config: > > .. > > > input="/pages/verifyorder.jsp" parameter="method" > > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > > scope="session"> > >path="/pages/choosemonitor.jsp"/> > > > > > > > > > > > > ACTION: > > public class StoreProductDispatchAction extends LookupDispatchAction > { > > > > protected Map getKeyMethodMap() { > > Map map = new HashMap(); > > map.put("button.add", AppConstants.ACTION_KEY_ADD); > > map.put("button.checkout"
RE: LookupDispatchAction problem
Yes, that makes sense, the property should have the "method" (if method is a parameter passed in struts-config.xml action) and the value of "method" should be the name of the method inside the action... and then public ActionForward myfunction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // do add I think that's how it is supposed to work... Regards, a.m. Suzette Daniel <[EMAIL PROTECTED]> 23/07/2003 04:43 PM Please respond to "Struts Users Mailing List" To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> cc: Subject:RE: LookupDispatchAction problem I received the same error, so I switched to using my own property "method" and if fixed that error. JSP: > Struts-config: >.. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> Suzette -Original Message----- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:40 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks to all earnest responses. I still have a problem, but it has evolved a little. I have simplified the syntax (using husted tip 003), so that my jsp has: (as he suggested, using the default name of submit that corresponds to the tag, and in my struts-config, I now have: and in my action I have: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.selectOrgs", "selectOrgs"); return map; } But alas, I am still getting an error (below). I wonder if my resource bundled is not being read properly, because the button on the form appears with the tag syntax " -Original Message----- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:19 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > With LookupDispatch you don't have to use a hidden tag. I think the > problem might be in your action itself. Look at Ted's > tip(http://husted.com/struts/tips/003.html) and below is a working sample. > > JSP: > titleKey="verify.order.add.another.button.title"> > > > > Struts-config: >.. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> > > > > > > > ACTION: > public class StoreProductDispatchAction extends LookupDispatchAction { > >protected Map getKeyMethodMap() { >Map map = new HashMap(); >map.put("button.add", AppConstants.ACTION_KEY_ADD); >map.put("button.checkout", AppConstants.ACTION_KEY_CHECK_OUT); >map.put("button.continue.shopping", > AppConstants.ACTION_KEY_DONT_SAVE); >return map; >} > >public ActionForward add(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { >//DO STUFF >return mapping.findForward(AppConstants.ACTION_KEY_ADD); >} > >public ActionForward checkout(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { >//DO STUFF >return mapping.findForward(AppConstants.ACTION_KEY_CHECK_OUT); >} > >public ActionForward dontsaveproduct(ActionMapping mapping, > ActionForm form, HttpServletRequest request, HttpServletResponse response) > throws IOException, ServletException { >//DO STUFF >return mapping.findForward(AppConstants.ACTION_KEY_DONT_SAVE); >} > > Suzette > > > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:01 PM > To: Struts Users Mailing List > Subject: Re: LookupDispatchAction problem &
RE: LookupDispatchAction problem
So, try creating a method called submit where the signature of the method would match the signature (parameters, return value etc) of selectOrgs Regards, Aleksandar. "Tim Clotworthy" <[EMAIL PROTECTED]> 23/07/2003 04:39 PM Please respond to "Struts Users Mailing List" To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> cc: Subject:RE: LookupDispatchAction problem Thanks to all earnest responses. I still have a problem, but it has evolved a little. I have simplified the syntax (using husted tip 003), so that my jsp has: (as he suggested, using the default name of submit that corresponds to the tag, and in my struts-config, I now have: and in my action I have: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.selectOrgs", "selectOrgs"); return map; } But alas, I am still getting an error (below). I wonder if my resource bundled is not being read properly, because the button on the form appears with the tag syntax " -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:19 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > With LookupDispatch you don't have to use a hidden tag. I think the > problem > might be in your action itself. Look at Ted's > tip(http://husted.com/struts/tips/003.html) and below is a working sample. > > JSP: > titleKey="verify.order.add.another.button.title"> > > > > Struts-config: >.. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> > > > > > > > ACTION: > public class StoreProductDispatchAction extends LookupDispatchAction { > >protected Map getKeyMethodMap() { >Map map = new HashMap(); >map.put("button.add", AppConstants.ACTION_KEY_ADD); >map.put("button.checkout", > AppConstants.ACTION_KEY_CHECK_OUT); >map.put("button.continue.shopping", > AppConstants.ACTION_KEY_DONT_SAVE); >return map; >} > >public ActionForward add(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { >//DO STUFF >return mapping.findForward(AppConstants.ACTION_KEY_ADD); >} > >public ActionForward checkout(ActionMapping mapping, ActionForm > form, HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { >//DO STUFF >return > mapping.findForward(AppConstants.ACTION_KEY_CHECK_OUT); >} > >public ActionForward dontsaveproduct(ActionMapping mapping, > ActionForm form, HttpServletRequest request, HttpServletResponse response) > throws IOException, ServletException { > //DO STUFF >return > mapping.findForward(AppConstants.ACTION_KEY_DONT_SAVE); >} > > Suzette > > > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:01 PM > To: Struts Users Mailing List > Subject: Re: LookupDispatchAction problem > > > On Wed, Jul 23,'03 (03:44 PM GMT-0400), Tim wrote: > > > I am getting the following exception: > > > > SupportOrgDispatchAction] does not contain handler parameter named > > method > > > > For this actionmapping: > > > > > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatc > > hAc tion" > >name="SupportOrgForm" parameter="method"> > > > > > > > > against these tags in my jsp: > > > > > > > > > > > > This is my first crack at subclassing the LookupDispatchAction. Any > > ideas as to what I am doing wrong are greatly appreciated. Thanks. > > > Are you sure you are passing in the form variable called "method" ? > Make sure on the form that submits
RE: LookupDispatchAction problem
I received the same error, so I switched to using my own property "method" and if fixed that error. JSP: > Struts-config: > .. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> Suzette -Original Message- From: Tim Clotworthy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:40 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction problem Thanks to all earnest responses. I still have a problem, but it has evolved a little. I have simplified the syntax (using husted tip 003), so that my jsp has: (as he suggested, using the default name of submit that corresponds to the tag, and in my struts-config, I now have: and in my action I have: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.selectOrgs", "selectOrgs"); return map; } But alas, I am still getting an error (below). I wonder if my resource bundled is not being read properly, because the button on the form appears with the tag syntax " -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:19 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > With LookupDispatch you don't have to use a hidden tag. I think the > problem might be in your action itself. Look at Ted's > tip(http://husted.com/struts/tips/003.html) and below is a working sample. > > JSP: >titleKey="verify.order.add.another.button.title"> > > > > Struts-config: > .. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> > > > > > > > ACTION: > public class StoreProductDispatchAction extends LookupDispatchAction { > > protected Map getKeyMethodMap() { > Map map = new HashMap(); > map.put("button.add", AppConstants.ACTION_KEY_ADD); > map.put("button.checkout", AppConstants.ACTION_KEY_CHECK_OUT); > map.put("button.continue.shopping", > AppConstants.ACTION_KEY_DONT_SAVE); > return map; > } > > public ActionForward add(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { > //DO STUFF > return mapping.findForward(AppConstants.ACTION_KEY_ADD); > } > > public ActionForward checkout(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { > //DO STUFF > return mapping.findForward(AppConstants.ACTION_KEY_CHECK_OUT); > } > > public ActionForward dontsaveproduct(ActionMapping mapping, > ActionForm form, HttpServletRequest request, HttpServletResponse response) > throws IOException, ServletException { > //DO STUFF > return mapping.findForward(AppConstants.ACTION_KEY_DONT_SAVE); > } > > Suzette > > > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:01 PM > To: Struts Users Mailing List > Subject: Re: LookupDispatchAction problem > > > On Wed, Jul 23,'03 (03:44 PM GMT-0400), Tim wrote: > > > I am getting the following exception: > > > > SupportOrgDispatchAction] does not contain handler parameter named > > method > > > > For this actionmapping: > > > > > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatc > > hAc tion" > >name="SupportOrgForm" parameter="method"> > > > > > > > > against these tags in my jsp: > > > > > > > > > > > > This is my first crack at subclassing the LookupDispatchAction. Any > > ideas as to what I am doing wrong are greatly appreciated. Thanks. > > > Are you sure you are passing in the form variable called "method" ? > Make sure on the form that submits you have at the least a hidden variable > called "method" ie.. > > > > and then of course make sure the associated form has get/sets for "method" > > (side note: I like to use the parameter name "di
RE: LookupDispatchAction problem
Thanks to all earnest responses. I still have a problem, but it has evolved a little. I have simplified the syntax (using husted tip 003), so that my jsp has: (as he suggested, using the default name of submit that corresponds to the tag, and in my struts-config, I now have: and in my action I have: protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.selectOrgs", "selectOrgs"); return map; } But alas, I am still getting an error (below). I wonder if my resource bundled is not being read properly, because the button on the form appears with the tag syntax " -Original Message- > From: Suzette Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:19 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction problem > > With LookupDispatch you don't have to use a hidden tag. I think the > problem > might be in your action itself. Look at Ted's > tip(http://husted.com/struts/tips/003.html) and below is a working sample. > > JSP: >titleKey="verify.order.add.another.button.title"> > > > > Struts-config: > .. > input="/pages/verifyorder.jsp" parameter="method" > type="com.waca.nec.consumer.actions.StoreProductDispatchAction" > scope="session"> > > > > > > > ACTION: > public class StoreProductDispatchAction extends LookupDispatchAction { > > protected Map getKeyMethodMap() { > Map map = new HashMap(); > map.put("button.add", AppConstants.ACTION_KEY_ADD); > map.put("button.checkout", > AppConstants.ACTION_KEY_CHECK_OUT); > map.put("button.continue.shopping", > AppConstants.ACTION_KEY_DONT_SAVE); > return map; > } > > public ActionForward add(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { > //DO STUFF > return mapping.findForward(AppConstants.ACTION_KEY_ADD); > } > > public ActionForward checkout(ActionMapping mapping, ActionForm > form, HttpServletRequest request, HttpServletResponse response) throws > IOException, ServletException { > //DO STUFF > return > mapping.findForward(AppConstants.ACTION_KEY_CHECK_OUT); > } > > public ActionForward dontsaveproduct(ActionMapping mapping, > ActionForm form, HttpServletRequest request, HttpServletResponse response) > throws IOException, ServletException { > //DO STUFF > return > mapping.findForward(AppConstants.ACTION_KEY_DONT_SAVE); > } > > Suzette > > > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 4:01 PM > To: Struts Users Mailing List > Subject: Re: LookupDispatchAction problem > > > On Wed, Jul 23,'03 (03:44 PM GMT-0400), Tim wrote: > > > I am getting the following exception: > > > > SupportOrgDispatchAction] does not contain handler parameter named > > method > > > > For this actionmapping: > > > > > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatc > > hAc tion" > >name="SupportOrgForm" parameter="method"> > > > > > > > > against these tags in my jsp: > > > > > > > > > > > > This is my first crack at subclassing the LookupDispatchAction. Any > > ideas as to what I am doing wrong are greatly appreciated. Thanks. > > > Are you sure you are passing in the form variable called "method" ? > Make sure on the form that submits you have at the least a hidden variable > called "method" ie.. > > > > and then of course make sure the associated form has get/sets for "method" > > (side note: I like to use the parameter name "dispatch" instead of method, > although on my little tutorials I used the parameter "methodToCall" > thinking > that would help give the idea of what's going on, but that was probably > more > confusing). > > -- > Rick > > > > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction problem
On Wed, Jul 23,'03 (04:19 PM GMT-0400), Suzette wrote: > With LookupDispatch you don't have to use a hidden tag. I think the > problem might be in your action itself. Yea, I'll shut up now:) I forgot also Tim mentioned he wanted to use LookupDispatchAction. I'm giving messed up advice answering too quickly. Felt like avoiding work for a second by responding to an e-mail and now I've made it all more confusing:) Sorry Tim. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookupDispatchAction problem
On Wed, Jul 23,'03 (04:03 PM GMT-0400), [EMAIL PROTECTED] wrote: > I am not "super-experienced" in this, but it seems to me, that your > line: > > Oh sorry, I missed that... I doubt the above would ever work. The "method" had to match an actual method in your DispatchAction. So the value needs to be the name of the dispatch method. Even if the name of your method was "Query" (not standard since methods should start with capital letters), I'm not sure it would work with all those spaces around it. (Personal preference is like to make my dispatch declaration a hidden field vs using it as the property of the submit button, but it will work as the submit button if labeled correctly). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction problem
With LookupDispatch you don't have to use a hidden tag. I think the problem might be in your action itself. Look at Ted's tip(http://husted.com/struts/tips/003.html) and below is a working sample. JSP: Struts-config: .. ACTION: public class StoreProductDispatchAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.add", AppConstants.ACTION_KEY_ADD); map.put("button.checkout", AppConstants.ACTION_KEY_CHECK_OUT); map.put("button.continue.shopping", AppConstants.ACTION_KEY_DONT_SAVE); return map; } public ActionForward add(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //DO STUFF return mapping.findForward(AppConstants.ACTION_KEY_ADD); } public ActionForward checkout(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //DO STUFF return mapping.findForward(AppConstants.ACTION_KEY_CHECK_OUT); } public ActionForward dontsaveproduct(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //DO STUFF return mapping.findForward(AppConstants.ACTION_KEY_DONT_SAVE); } Suzette -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:01 PM To: Struts Users Mailing List Subject: Re: LookupDispatchAction problem On Wed, Jul 23,'03 (03:44 PM GMT-0400), Tim wrote: > I am getting the following exception: > > SupportOrgDispatchAction] does not contain handler parameter named > method > > For this actionmapping: > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatc > hAc tion" >name="SupportOrgForm" parameter="method"> > > > > against these tags in my jsp: > > > > > > This is my first crack at subclassing the LookupDispatchAction. Any > ideas as to what I am doing wrong are greatly appreciated. Thanks. Are you sure you are passing in the form variable called "method" ? Make sure on the form that submits you have at the least a hidden variable called "method" ie.. and then of course make sure the associated form has get/sets for "method" (side note: I like to use the parameter name "dispatch" instead of method, although on my little tutorials I used the parameter "methodToCall" thinking that would help give the idea of what's going on, but that was probably more confusing). -- Rick - 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]
Re: LookupDispatchAction problem
Hi Tim, I am not "super-experienced" in this, but it seems to me, that your line: should actualy be: and then, in your .properties file for internationalization etc. some.key.value= Query and then in your class that extends LookupDispatchAction extended class, you need to implement the protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("some.key.value", "doit"); return map; } public ActionForward doit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // do add return mapping.findForward("success"); } Hope this helps... Regards, Aleksandar Matijaca "Tim Clotworthy" <[EMAIL PROTECTED]> 23/07/2003 03:44 PM Please respond to "Struts Users Mailing List" To: "Struts Users Mailing List" <[EMAIL PROTECTED]> cc: Subject:LookupDispatchAction problem I am getting the following exception: SupportOrgDispatchAction] does not contain handler parameter named method For this actionmapping: against these tags in my jsp: This is my first crack at subclassing the LookupDispatchAction. Any ideas as to what I am doing wrong are greatly appreciated. Thanks.
Re: LookupDispatchAction problem
On Wed, Jul 23,'03 (03:44 PM GMT-0400), Tim wrote: > I am getting the following exception: > > SupportOrgDispatchAction] does not contain handler parameter named > method > > For this actionmapping: > > > type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatc > hAc tion" >name="SupportOrgForm" parameter="method"> > > > > against these tags in my jsp: > > > > > > This is my first crack at subclassing the LookupDispatchAction. Any > ideas as to what I am doing wrong are greatly appreciated. Thanks. Are you sure you are passing in the form variable called "method" ? Make sure on the form that submits you have at the least a hidden variable called "method" ie.. and then of course make sure the associated form has get/sets for "method" (side note: I like to use the parameter name "dispatch" instead of method, although on my little tutorials I used the parameter "methodToCall" thinking that would help give the idea of what's going on, but that was probably more confusing). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction problem
I am getting the following exception: SupportOrgDispatchAction] does not contain handler parameter named method For this actionmapping: against these tags in my jsp: This is my first crack at subclassing the LookupDispatchAction. Any ideas as to what I am doing wrong are greatly appreciated. Thanks.