facebook

Tomcat deployment of /lib directory [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #214873 Reply

    Hi,

    I created a project, which originally only had the src directory. I added web capabilities to the project. Later I added a lib and a resources directory. I added the resources directory to my build path so the properties files are copied directly to the WEB-INF/classes directory upon deployment.

    My problem: when deploying, the content of the lib directory is not copied to the WEB-INF directory. I’m sure it’s because of a dumb reason but I can’t find how to do it, other than moving the lib directory to the WEB-INF directory. Is this really how things are supposed to be done? I looked around the project properties but there isn’t a way to configure this sort of thing after the fact.

    Am I overlooking something obvious?

    L

    #214887 Reply

    Riyad Kalla
    Member

    L,
    Web spec dictates that web applications have a WEB-INF/classes and WEB-INF/lib directory where compiled sources go into the classes dir and libraries required for your webapp to function (Struts, Hibernate, Spring, etc.) go into the lib directory. Once they are there, MyEclipse will deploy them correctly.

    #214890 Reply

    I know about the spec. What I was wondering is if I have to do this every time in Eclipse (or ME) or if there was a way to tell ME to copy the contents of the lib directory to WEB-INF/lib when deploying? I guess not.

    L

    #214894 Reply

    Riyad Kalla
    Member

    Ahh, no there is not currently a way to do that.. although I suppose you could hack around it by adding the JARs as “External JARs” to your project, then setting your deployment rules to “copy external JARs to WEB-INF/lib”… that might work, but its like scratching your left ear with your right hand 😛

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Tomcat deployment of /lib directory [Closed]

You must be logged in to post in the forum log in