loading a CharsetProvider via WebappClassLoader

View: New views
4 Messages — Rating Filter:   Alert me  

loading a CharsetProvider via WebappClassLoader

by Ronald Klop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have this jar (jutf7.jar) which should register itself with the CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is ignored by Java. I understand that this is because of order in which the WebappClassLoader asks all other classloaders for a class.
How can this be solved? Withouting having to deploy a jar file outside of the webapp. Or is this not possible?

Thanks in advance for any tips.

Ronald.


Re: loading a CharsetProvider via WebappClassLoader

by Kris Schneider-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

While the Javadoc for CharsetProvider claims that providers are looked
up via the current thread's context class loader, the code for Charset
seems to clearly be using ClassLoader.getSystemClassLoader()...

On Thu, Oct 29, 2009 at 10:51 AM, Ronald Klop
<ronald-mailinglist@...> wrote:

> Hi,
>
> I have this jar (jutf7.jar) which should register itself with the
> CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is
> ignored by Java. I understand that this is because of order in which the
> WebappClassLoader asks all other classloaders for a class.
> How can this be solved? Withouting having to deploy a jar file outside of
> the webapp. Or is this not possible?
>
> Thanks in advance for any tips.
>
> Ronald.

--
Kris Schneider

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


Re: loading a CharsetProvider via WebappClassLoader

by Kris Schneider-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess this bug will be of interest since it mentions both jutf7 and
webapps ;-)

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4619777

On Thu, Oct 29, 2009 at 11:42 AM, Kris Schneider <kschneider@...> wrote:

> While the Javadoc for CharsetProvider claims that providers are looked
> up via the current thread's context class loader, the code for Charset
> seems to clearly be using ClassLoader.getSystemClassLoader()...
>
> On Thu, Oct 29, 2009 at 10:51 AM, Ronald Klop
> <ronald-mailinglist@...> wrote:
>> Hi,
>>
>> I have this jar (jutf7.jar) which should register itself with the
>> CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is
>> ignored by Java. I understand that this is because of order in which the
>> WebappClassLoader asks all other classloaders for a class.
>> How can this be solved? Withouting having to deploy a jar file outside of
>> the webapp. Or is this not possible?
>>
>> Thanks in advance for any tips.
>>
>> Ronald.
>
> --
> Kris Schneider
>



--
Kris Schneider

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


Re: loading a CharsetProvider via WebappClassLoader

by Ronald Klop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kris,

Thanks a lot for these pointers. It makes a lot very clear and we will do the dirty workaround now and vote for the bugs at the Sun website.

Ronald.


Op donderdag, 29 oktober 2009 16:48 schreef Kris Schneider <kschneider@...>:

>
>  
> I guess this bug will be of interest since it mentions both jutf7 and
> webapps ;-)
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4619777
>
> On Thu, Oct 29, 2009 at 11:42 AM, Kris Schneider <kschneider@...> wrote:
> > While the Javadoc for CharsetProvider claims that providers are looked
> > up via the current thread's context class loader, the code for Charset
> > seems to clearly be using ClassLoader.getSystemClassLoader()...
> >
> > On Thu, Oct 29, 2009 at 10:51 AM, Ronald Klop
> > <ronald-mailinglist@...> wrote:
> >> Hi,
> >>
> >> I have this jar (jutf7.jar) which should register itself with the
> >> CharsetProvider of Java. If I put it in the WEB-INF/lib directory it is
> >> ignored by Java. I understand that this is because of order in which the
> >> WebappClassLoader asks all other classloaders for a class.
> >> How can this be solved? Withouting having to deploy a jar file outside of
> >> the webapp. Or is this not possible?
> >>
> >> Thanks in advance for any tips.
> >>
> >> Ronald.
> >
> > --
> > Kris Schneider
> >
>
>
>
> --
> Kris Schneider
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
>