tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: URLStreamHandlerFactory
Date Tue, 15 Jan 2013 19:48:01 GMT
On 15/01/2013 19:09, Christopher Schultz wrote:
> Sriram,
> 
> On 1/15/13 12:50 PM, e e wrote:
>> [I a]m trying to understand why WebAppLoader does a 
>> URL.setURLStreamHandlerFactory().
> 
> Presumably, it's important to handle URLs in a custom way for web 
> applications.

No. It is because Tomcat uses "jndi://..." for handling web
application resources.

>> I see that a protocol handler is being set for "jndi://"
>> protocol. Our apps' do NOT use JNDI urls. I believe tomcat 6 has
>> NOT used the jndi url anywhere in its codebase.

Wrong. See above.

> Tomcat includes a lightweight JNDI that can be used for things like
> JDBC DataSources. So, if you configure a DataSource, your webapp
> will be able to fetch it using JNDI.

Irrelevant to this issue.

>> What [features] in tomcat will get affected if I set my factory 
>> before tomcat sets it[?] ([note:] Factory can be set only once).
>> - What [features] will I lose if I set my factory[?]

Pretty much everything.

>> - I cannot change the webapp's code to use the overloaded 
>> java.net.URL() which takes a URLStreamHandler as an argument. 
>> (Will require code changes across 50 applications) - I cannot
>> set the "*java.protocol.handler.pkgs*" as these classes must be
>> present in the system classpath. (Classloader hierarchy of our
>> app-server makes it difficult) (We run tomcat as one of the
>> components in our server) (Similar to any j2ee server)

You need to use Tomcat 7.
See https://issues.apache.org/bugzilla/show_bug.cgi?id=26701

Mark

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


Mime
View raw message