I have an applet that needs to be called by JAXP, in particular SAXParserFactory . Now, as you can see from Javadoc, this internally uses the service provider's mechanism, as described here :
In particular, if he does not find the file in any of the JAR applications of my application called META-INF/services/javax.xml.parsers.SAXParserFactory , he will try to extract it from my application code base. If I have deployed the applet as follows:
<applet code="com.example.applets.MyApplet" codebase="http://www.example.com/myapp/" archive="myapp.jar, dom4j.jar">
He will then try to make an HTTP request http://www.example.com/myapp/META-INF/services/javax.xml.parsers.SAXParserFactory
I would rather not do this, especially because my applet is signed up and this extra HTTP call triggers a warning about unsigned code .
Now the obvious solution is to just put the META-INF / services file into my JAR application, as it says, but how do I do it, but still get it to use JERX JERX for the user JRE? Alternatively, is there a way to convince the applet runtime to search only in my JAR files, and not in the codebase for this file?
Note. I know that I could also deploy my own copy of JAXP-RI, but this is pretty hard for the applet.
source share