• 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

one action class entry for multiple action paths in struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would want to make a single action class entry in struts config for multiple action paths because i want to call the same action class to cater to these requests. so instead of making multiple action entries in struts-config, can i make single entry and the path attribute be filled with all the action paths that i want the action to be called for? I hope the question is clear. Thanks in advance.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of Struts?
 
Jack Sully
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using version 1.2.
To give a more clear picture, this is what i am looking for.

I need to navigate from one page to another, but the links are language specific but the jsp that caters to all these requests is one and the same. So if a english user clicks on "show items" link it would read something like /en/showitems/ (this calls ShowCatalogue action class). if a german user clicks on "show items" link, the link would read something line /de/showitems/ (this calls ShowCatalogue action class). I hope it is more clear now.

I would like to add one more question out here. Is it compulsory to put the properties files in the WEB-INF/classes folder? i tried putting them in other folders but they are not recognized. Secondly i want to move away from classes folder is because during building of the project, the properties files are deleted. So kindly guide me on this one too. thanks in advance.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure why the property files would be deleted, unless you mean you're building directly to /WEB-INF/classes. In that case, the property files should be put in the source directory|ies and moved as part of the build.

I don't have a good answer for changing the links, but if it's locale-specific then you could always just build the links using the user's locale.
 
Jack Sully
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i tried puttting the properties files in src folder but they are not recognized at all. secondly i can make the URLs but then i need an action entry in the struts config for the same. So if i support 10 languages on my site then i will have to have 10 different action mappings in the struts config pointing to the same action class. I hope this is clear. thanks for the guidance. :-)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic