Compression Filter and JBoss 4.01

  1. Craig

    I'm trying to configure netspade's compression filter with an application that is running under JBoss 4.0.1 but I keep getting a ClassNotFoundException when starting JBoss.

    Here is my web.xml config:

    <filter>
    <filter-name>compressionFilter</filter-name>
    <filter-class>com.netspade.servlet.compress.CompressionFilter</filter-class>
    </filter>

    <filter-mapping>
    <filter-name>compressionFilter</filter-name>
    <servlet-name>action</servlet-name> <!-- Struts action servlet name -->
    </filter-mapping>

    Note: Netspade's jar is showing up in the WEB-INF/lib dir of my application.

    I must be doing something stupid here...but can't seem to figure out what.

    Any help would be great.

    Thanks

    Posted: 2005-04-19 02:01:42.704750 #

  2. jason

    Hmmm, that's strange because .jar files in the WEB-INF/lib directory should be automatically added to the CLASSPATH. Maybe you could try setting the CLASSPATH to include the NetSpade jar manually? I don't know much about JBoss, but maybe it doesn't add them automatically or something for security reasons.

    Are you using JBoss integrated with Tomcat?

    Also maybe you could try checking to see if the JAR file contains the correct classes and isn't corrupted.

    --Jase

    Posted: 2005-04-19 10:06:22.511484 #

  3. Craig

    Got it to work!

    It seems that the jar contains corrupt classes when using the jar from the binary distro.

    To resolve I downloaded the src and rebuilt the distro and everything was good to go. One thing to note, is that the src distro is missing the servlet 2.3 api jar and I had to mess with the build.xml to include my own jar.

    A side note which shouldn't really matter in this case but I'm running JBoss 4.0.1 on a linux platform.

    Thanks for the help.

    Posted: 2005-04-20 01:24:25.269640 #

:
: