How to change the Java webapp 'WEB-INF path' convention under tomcat or jetty -
under java webapp,
i want set /web-inf/lib d:/somepath/lib
and /web-inf/classes e:/somepath/classes
and web.xml f:/somepath/config.xml
how config these under tomcat or jetty change convention?
the specification (java™ servlet specification version 2.3) mentions standard folders:
the web application classloader must load classes web-inf/classes directory first, , library jars in web-inf/lib directory.
with tomcat or jetty cannot "out-of-box" provided functionality:
webappx — class loader created each web application deployed in single tomcat instance. unpacked classes , resources in /web-inf/classes directory of web application, plus classes , resources in jar files under /web-inf/lib directory of web application, made visible web application, not other ones.
the normal configuration each web context (web application or war file) given it's own classloader, has system classloader it's parent. such classloader hierarchy normal in java, servlet specification complicates hierarchy requiring that:
classes contained within web-inf/lib or web-inf/classes have priority on classes on parent class loader. opposite of normal behaviour of java 2 class loader.
however, can:
cheers
Comments
Post a Comment