Christopher Schultz <chris <at> christopherschultz.net> writes:
> 
> [...]
> | problem is, none of these approaches work in Tomcat 5.5. For 1), this
> simply
> | didn't have any effect for me. 2) neither, maybe Tomcat simply ignores
> that
> | property?
> 
> How did you set the property?

I am running my web app inside an Eclipse WTP server container project. So I set
the property as a JVM argument in the Server project's "Run" dialog. I set it
like this:

-Djava.protocol.handler.pkgs="my.protocol"

...given that the Handler class is in package "my.protocol.notes".

am I missing something here?

> | Does Tomcat meanwhile have some workaround for this? I mean, I don't
> even need
> | an actual URL connection, I just want to pass custom URL strings,
> which should
> | be perfectly fine if they are valid URLs, no?!
> 
> Do you have the opportunity to intercept these URL objects, or are they
> always handled somewhere that you can't inspect them. I'm wondering if
> you can convert a notes:// URL into, say, an http:// URL before
> attempting to call URL.openConnection. I don't know anything about
> notes://, so maybe it isn't even HTTP-compatible.
> 
> I'm sure there's a way around this. Give us some more information and
> we'll see what we can do.

Actually I don't even call URL.openConnection, because I don't need it at all.
It's really just that the java.net.URL constructor requires that there exists an
object which implements this behavior just in case someone should try to open a
connection.

My situation really is just that there is an API some methods of which take URL
objects instead of plain URL strings in order to link to documents from a web
page (intranet pages). Since notes:// links will open in the Lotus Notes client,
which everyone uses in this company, it should be fine to pass notes:// links if
they are wellformed. There are no calls to openConnection.

Throwing a MalformedUrl in the constructor if no connection handler is found for
the given protocol is simply a bad design decision IMHO (besides, what does
connection handling have to do with wellformed URLs). These things should really
be postponed to the time where someone actually tries to open a connection from
that URL. But since I can neither change that API I use nor the JVM
implementation, I have to find another way to work around that problem :-)

Best,
Matthias


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to