How to change classpath or add classpath for Jetty

I am deploying a web application in a Jetty container and I need to know how to add a classpath for Jetty in order to be able to load resources from the test directory.

+3
source share
2 answers

I think it's best not to modify the Jetty CLASSPATH; use what you know about the default settings for your web application.

All JARs in WEB-INF / lib are your CLASSPATH web application; so all paths are relative to WEB-INF / classes. If you put the directory / test resources in WEB-INF / classes and load it as a stream of resources from the context, you can access these test files without changing the Jetty startup scripts.

+3
source

All Articles