Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

struts config file

Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have a form bean associated with a search page. This is an extract from the struts config file:

The user can perform a search in two different modes Advanced Search and Quick Search. For both search modes there are various categories on which search can be performed e.g. Quick Search - All, Quick Search - Images. Therefore i need to take the user back to the correct page from which the user has come from if a validation error occurs. Can anyone advise on this? What can i fill in in the input attribute for the action tag?

Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can break it up.
Have a single ForwardAction that take you to the QuickPage.jsp or AdvancedPage.jsp

And then have a DispatchAction that handles both the pages depending on the 'parameter'. This way you put QuickPage.jsp and AdvancedPage.jsp in the input attributes for the respective actions.
I'm sure you will be calling number of same classes, these you could move to a base action class to avoid cut n paste code.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic