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

          Lukasz Lenart made changes -
          Fix Version/s 2.5 [ 12324447 ]
          Fix Version/s 2.3.18 [ 12319176 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.x [ 12319176 ]
          Fix Version/s 2.3.17 [ 12324780 ]
          Lukasz Lenart made changes -
          Summary struts.xml not loading other xml files when in a jar allow include other config files from classpath
          Lukasz Lenart made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.17 [ 12324780 ]
          Fix Version/s 2.3.16 [ 12324546 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.16 [ 12324546 ]
          Fix Version/s 2.3.15 [ 12324267 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.15 [ 12324267 ]
          Fix Version/s 2.3.14 [ 12324256 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.14 [ 12324256 ]
          Fix Version/s 2.3.13 [ 12324132 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.13 [ 12324132 ]
          Fix Version/s 2.3.12 [ 12324067 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.12 [ 12324067 ]
          Fix Version/s 2.3.11 [ 12323903 ]
          Lukasz Lenart made changes -
          Link This issue relates to WW-3961 [ WW-3961 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.10 [ 12323903 ]
          Fix Version/s 2.3.9 [ 12323841 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.9 [ 12323841 ]
          Fix Version/s 2.3.8 [ 12323480 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.8 [ 12323480 ]
          Fix Version/s 2.3.7 [ 12323448 ]
          Lukasz Lenart made changes -
          Field Original Value New Value
          Fix Version/s 2.3.7 [ 12323448 ]
          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
          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 -

          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
          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"/> ?
          Juan Alvarez G created issue -

            People

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

              Dates

              • Created:
                Updated:

                Development