java - Including a directory inside web-inf/lib in tomcat classpath -
in webapp; web-inf/lib added in classpath default fine. now, want add spring jar files in tomcat's classpath. if put jar files inside web-inf/lib; works fine. if want add directory web-inf/lib/spring , put jar files inside spring directory ; doesnt work. how can include web-inf/lib/spring in classpath.
i prefer make changes in web.xml localised webapp. surely not want make changes in catalina.properties because there jar files loaded in jvm ( not added in classpath )
you shouldn't care how jar files segregated war file: it's used container. segregating jar files useful in source project. need have build process (using ant, gradle, whatever) copies jar files subdirectories web-inf/lib
. using ant:
<copy todir="web/web-inf/lib" flatten="true"> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </copy>
Comments
Post a Comment