Announcement Announcement Module
Collapse
No announcement yet.
how to set another folder as library folder? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to set another folder as library folder?

    Hi,

    I'm not sure this is something related to spring or tomcat (i use tomcat).

    I would like to know how to set a folder as library folder on top of using the /WEB-INF/lib/ folder to contain my jar. Example for my use case I want to have all the free library under /WEB/lib/ and the non free library under /WEB/nonfree-lib/

    Is this something can be done using the web.xml ?

  • #2
    You cannot. The only available directory is the lib directory this is dictated by the specification. The only solution could be to use an ear and include some dirs in there, create a manifest which puts everything on the classpath. However that would lead you away from tomcat and would involve a fullblown j2ee server.

    Comment


    • #3
      hmn.. that's a bit annoying not to be able to set it, but as expected after i read number of documents and cannot find any lead to it.

      thanks for the reply

      Comment


      • #4
        Originally posted by otnateos View Post
        hmn.. that's a bit annoying not to be able to set it, but as expected after i read number of documents and cannot find any lead to it.
        I wonder whether you need this distinction at deployment time in the first place. Though I think the separation itself might be useful. So I suggest to organize your build-path accordingly, so that you have the jars in distinct locations in your build environments. Your build script could then merge together the libs so that they end up in WEB-INF/lib.

        Just an idea,
        Andreas

        Comment


        • #5
          Originally posted by Andreas Senft View Post
          I wonder whether you need this distinction at deployment time in the first place. Though I think the separation itself might be useful. So I suggest to organize your build-path accordingly, so that you have the jars in distinct locations in your build environments. Your build script could then merge together the libs so that they end up in WEB-INF/lib.

          Just an idea,
          Andreas
          I think that's the only way to go. I just thought maybe i could split them up into separate folder for different kind of libraries.

          Comment

          Working...
          X