Carsten Ziegeler wrote:
Reinhard Poetz wrote:
what's wrong with e.g. servlet:@com.mycompany.block1.servlet:/...?
It's valid - but it looks strange to me; I would expect a user name
after the '@'.
valid point ... then it seems that we have to continue the contest :-)
AFAIU, we have to register our own protocols. For that purpose we have
to call
http://javadoc.developintelligence.com/java/net/URL.html#setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)
and according to the javadocs it can only be called once per JVM. Is
it a good idea to rely on having to be the first?
:)
Yes, this is what the docs say - but there are solutions which work even
if you're not first, e.g. equinox is doing this. So it's technically
possible and it makes using custom protocols even easier.
I thought that there was some solution but wasn't sure whether we could use if
for our own purpose.
I don't say that we should switch from source resolver to url and change
everything we have; I just want to point out, that we should keep this
in mind when creating urls.
ok.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------