This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Action Question

 
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello;

This is my firs time working with struts and I am working in an existing application. I need to expose a method in an Action and am getting a "does not contain specified method" exception. I suspect I have not configured the action correctly (do I need a form bean?). Also I have an extra parameter (page) that I am not sure how to map.

Any tips?

Below are my details.

Here is the Struts config


In an action, that extends DispatchAction, I have the following method (code reduced for brevity):


I call the action like this.



The error I get is:

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd first try correcting the URL:This has two question marks ("?") in it; the second one should be an ampersand ("&"). If I had to guess I'd say it's checking after the last question mark for the request parameters--but that's just a guess.
 
Luke Shannon
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dave. The URL was indeed wrong, also it looks like I did need to add the pageIndex parameter to the form bean. I did find out the Action I was working in (and trying to map in the Struts config) is extended by another Action that is already configured. I was able to access my method through this class so I no longer needed the mapping I posted earlier.

I have an experienced struts person working with me now so everything is back on track.

Thanks for your reply.
 
Everybody! Do the Funky Monkey! Like this tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic