Is there a way to reference a handler configuration file (e.g.: handler.xml) that is distributed inside a JAR file?
Something like this: @HandlerChain(file="somefile.jar")
or @HandlerChain(file="myhandler.xml")
, assuming that myhandler.xml
is stored in somefile.jar
.
For both server and client implementations of handlers using the
@HandlerChain annotation, you must specify the location of the handler
configuration as either a relative path from the annotated file or as
an absolute URL. For example:
@HandlerChain(file="../../common/handlers/myhandlers.xml")
or
@HandlerChain(file="http://foo.com/myhandlers.xml")
Taken from this doc.
handler-chain.xml file must be inside the same classpath or same jar.
You need to specify the actual location of xml to load.