0 Replies Latest reply on May 11, 2006 6:59 PM by butz2

    CharsetProvider does not work in Webapp

    butz2

      Hi,

      in JDK 1.5 there is support for adding a charset by creating a class that extends java.nio.charset.spi.CharsetProvider and one that extends java.nio.charset.Charset.

      The CharsetProvider is identified by placing a file called java.nio.charset.spi.CharsetProvider in META-INF/services of a jar-file in the classpath and should then be loaded.

      This works fine when I run standalone but when I put the jar file in server/default/lib, it does not work. The classloader can't find my provider and it is never instansiated. I've checked which charsets are availible according to the classloader at that time and my charset is not included eventhough I have no problem to instanciate classes from that jar.

      A bad hack but which works is to put this jar file onto the JBOSSCLASSPATH in the run.bat/.sh Script, but this is really just because I did not know what to do otherwise...

      Any ideas...?
      Thanks
      Werner