Jetty
  1. Jetty
  2. JETTY-381

Multiple Web Application Source Directory

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0pre3
    • Component/s: Maven
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Context
      -----------
      I want to use maven-jetty-pling in hotdeploy mode.
      My web app use Struts Framework.
      I also use Xdoclet in order to generate the struts-config.xml and validation.xml
      But I want to generate these files in a target directory in order to separate the source and generated files
      Unfortunatly, this does seems not possible yet because I need to inform jetty that my web app source directory is split in two differents paths (src/main/webapp and target/xdoclet/)
      In fact, I need to configure the struts servlet in the web.xml like this :
      <init-param>
      <param-name>config</param-name>
      <param-value>/generated/struts-config.xml</param-value>
      </init-param>

      It's important to notice that the solution adding the path (target/xdoclet/) in the classpath do not solve my problem. In fact, the problem is not related to the classpath but rather to the web app source directory.

      Need
      --------
      The only solution seems to add a new feature to jetty in order to be able to use multiple web application source directories.
      In our case, we would like to have something like that:
      <Call name="addLifeCycle">
      <Arg>
      <New class="org.mortbay.jetty.deployer.WebAppDeployer">
      <Set name="contexts"><Ref id="Contexts"/></Set>
      <Set name="webAppDirs">
      <Array type="java.lang.String">
      <Item>src/main/webapp</Item>
      <Item>target/xdoclet/</Item>
      </Array>
      </Set>
      [...]
      </New>
      </Arg>
      </Call>

        Issue Links

          Activity

          Hide
          Rémy Sanlaville added a comment -

          I agree that this feature is very useful when you want to separate the source files and the generated sources files.

          I also found no solution for this need.
          For the moment, we have to merge the generate source (like generate files from xdoclet ) with our source files, but it's unsatisfactory.

          Show
          Rémy Sanlaville added a comment - I agree that this feature is very useful when you want to separate the source files and the generated sources files. I also found no solution for this need. For the moment, we have to merge the generate source (like generate files from xdoclet ) with our source files, but it's unsatisfactory.
          Hide
          David Yu added a comment -

          Remy,

          The files located in target/xdoclet/, are they all static files? (or do you also have a WEB-INF/web.xml in there for your other servlets?)

          Cheers

          Show
          David Yu added a comment - Remy, The files located in target/xdoclet/, are they all static files? (or do you also have a WEB-INF/web.xml in there for your other servlets?) Cheers
          Hide
          Rémy Sanlaville added a comment -

          David,

          With xdoclet, it's mainly static files : struts-config.xml and validation.xml

          Of course it will be great to also take into account a WEB-INF/web.xml but it seems to be not easy.
          It will be a good improvement if it's possible to do a first step by adding this feature without managing a WEB-INF/web.xml

          Cheers

          Show
          Rémy Sanlaville added a comment - David, With xdoclet, it's mainly static files : struts-config.xml and validation.xml Of course it will be great to also take into account a WEB-INF/web.xml but it seems to be not easy. It will be a good improvement if it's possible to do a first step by adding this feature without managing a WEB-INF/web.xml Cheers
          Hide
          David Yu added a comment -
          Show
          David Yu added a comment - Available in trunk.(jetty7) http://docs.codehaus.org/display/JETTY/Multiple+WebApp+Source+Directory

            People

            • Assignee:
              David Yu
              Reporter:
              Jeremy Lauture
            • Votes:
              6 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: