tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignacio Ocampo <>
Subject java.protocol.handler.pkgs does not work with Tomcat 7
Date Mon, 17 Nov 2014 21:47:26 GMT
Hi all,

I'm using a third part library for NTLM authentication, one of their
requeriments is to set: System.setProperty("java.protocol.handler.pkgs",

But, it does not take any effect, I see Tomcat 7 source code here:

        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
        if (first) {
            first = false;
            try {
*                URL.setURLStreamHandlerFactory(streamHandlerFactory);*
            } catch (Exception e) {
                // Log and continue anyway, this is not critical
                log.error("Error registering jndi stream handler", e);
            } catch (Throwable t) {
                // This is likely a dual registration
      "Dual registration of jndi stream handler: "
                         + t.getMessage());

And I see *URL.setURLStreamHandlerFactory *documentation at:

public static void setURLStreamHandlerFactory(URLStreamHandlerFactory

Sets an application's URLStreamHandlerFactory. This method can be called at
most once in a given Java Virtual Machine.

The URLStreamHandlerFactory instance is used to construct a stream protocol
handler from a protocol name.
I tried set -Djava.protocol.handler.pkgs=jespa in and put my
jars in jdk/lib, jdk/jre/lib, tomcat/lib, tomcat/webapps/ROOT/WEB-INF/lib,
but nothing.

I hope your comments.


Ignacio Ocampo Millán

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message