Struts 2
  1. Struts 2
  2. WW-3787

allow include other config files from classpath

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8, 2.3.1.2
    • Fix Version/s: 2.5
    • Component/s: XML Configuration
    • Labels:
      None

      Description

      My struts.xml has something like this:

      <include file="struts/*.xml" />

      which works fine when the war is exploded and the files are under WEB-INF\classes

      but I build the application (war) with maven2 and I do package classes in a jar file.

      When Tomcat starts (tried with Tomcat 5 and Tomcat 7) only the main struts.xml (which is inside the jar) is loaded but not the ones inside struts/*.xml

      Am I doing something wrong? I looked for other options like <include file="classpath:..." /> but doesnt work

      Documentation says you can split the file and put into other jars but only with the name struts.xml. I do need multple files in a jar.

      Please advise.

        Issue Links

          Activity

          Hide
          Lukasz Lenart added a comment -

          Did you try to use just <include file="*.xml"/> ?

          Show
          Lukasz Lenart added a comment - Did you try to use just <include file="*.xml"/> ?
          Hide
          Juan Alvarez G added a comment -

          The problem is that I have a lot of xml files which are not struts files (such as spring), so I put all struts files inside a "struts" folder (also for separation)

          Show
          Juan Alvarez G added a comment - The problem is that I have a lot of xml files which are not struts files (such as spring), so I put all struts files inside a "struts" folder (also for separation)
          Hide
          Dave Newton added a comment -

          Are the files at the root level, or actually in a package called struts?

          Show
          Dave Newton added a comment - Are the files at the root level, or actually in a package called struts ?
          Hide
          Juan Alvarez G added a comment -

          Thanks for writing!

          They are inside a package called struts

          Show
          Juan Alvarez G added a comment - Thanks for writing! They are inside a package called struts

            People

            • Assignee:
              Unassigned
              Reporter:
              Juan Alvarez G
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development