You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Goldhahn <Ma...@vismaunique.no> on 2005/02/04 14:58:59 UTC

pluggable protocols in web apps

We use pluggable protocols to access resources. These don't seem to work
with the class loading scheme Tomcat is using. Having a class
no.mycomp.protocols.myprot.Handler I do the following:
1. prepend "no.mycomp.protocols|" to the system property
"java.protocol.handler.pkgs"
2. create a URL with URL u = new URL("myprot://whatever");
I get a MalformedUrlException: unknown protocol myprot
When I debug the code I see that the call Class.forName(....) in
URL.getURLStreamHandler() fails (The one in the try block). After that
the System class loader cannot load my protocol handler either. 

Is ther a way to get this working. perferably without moving archives to
Tomcat's common\ or Java's endorsed path?

Martin 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: pluggable protocols in web apps

Posted by Mark Thomas <ma...@apache.org>.
No useful info at the moment but this looks a lot like bug 10982 
(http://issues.apache.org/bugzilla/show_bug.cgi?id=10982) that I am just 
starting to look at. Keep an eye on this bug report. If I make any 
progress I will update it.

Mark

Martin Goldhahn wrote:
> We use pluggable protocols to access resources. These don't seem to work
> with the class loading scheme Tomcat is using. Having a class
> no.mycomp.protocols.myprot.Handler I do the following:
> 1. prepend "no.mycomp.protocols|" to the system property
> "java.protocol.handler.pkgs"
> 2. create a URL with URL u = new URL("myprot://whatever");
> I get a MalformedUrlException: unknown protocol myprot
> When I debug the code I see that the call Class.forName(....) in
> URL.getURLStreamHandler() fails (The one in the try block). After that
> the System class loader cannot load my protocol handler either. 
> 
> Is ther a way to get this working. perferably without moving archives to
> Tomcat's common\ or Java's endorsed path?
> 
> Martin 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org