• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts config file

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?


Thanks
 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic