• 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 2 - Modularization of struts.xml

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created an additional Source Folder in eclipse (src/config) to house my other xml modules.
I'm not sure how to reference these modules from my struts.xml, of if I can even do this.



I'm getting the following error when referencing actions found in my include.config.xml file located in src/config.

The Struts dispatcher cannot be found.


This leads me to believe the file path I'm entering for <include file="include-config.xml"/> is incorrect.



Chris

 
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
If the entire source directory is being deployed then what you've actually done is create a new package, "config".

Config files are in the classpath, and should be referred with standard classpath hierarchy: config/include-config.xml (I don't remember if a leading slash is necessary or not).

See also:
<include> element documentation
FAQ entry: Can we break up a Struts 2 config file into smaller pieces
reply
    Bookmark Topic Watch Topic
  • New Topic