tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: enabling/disabling a servlet filter conditionally
Date Mon, 04 Aug 2008 13:37:20 GMT
Hash: SHA1


André Warnier wrote:
| I have one more question, if you would be so kind and if it is not too
| heavy to handle here (and at the risk of sounding very "amateur") :

Hey, this list is what its members make of it. If [all of] you want to
discuss simple stuff, so be it. But it's much more interesting when
people ask interesting questions instead of things like "how do I
install Java?", so I welcome questions whose answers result in people
learning things they can't learn from copying an example from a tutorial.

| In the standard configuration, the JCIFS filter comes as a jar, which
| gets placed in the WEB-INF/lib sub-dir of the webapp.
| If I need to "build it into" my own filter, how do I do that?

You don't need to do anything special at all. The webapp's classloader
will fetch the appropriate class from wherever it is stored -- whether
it be in a JAR in your WEB-INF/lib directory or as a .class file in your
WEB-INF/classes hierarchy.

| Do I unpack the jar first when and where I compile my own filter, so
| that the classes are available then ?

Nope. You can just use the JAR file as a compile-time dependency for
your filter (or the entire webapp if you prefer).

| I compile my filter right now with a very basic method, using a
| command-file (under Windows) like :
| echo on
| set JAVA_HOME=c:\java1.5
| javac -classpath

| %1

Time to move to ant, baby. Once you get over the fact that it's just
/not/ 'make', you'll learn to love it.

| Do I just add the jar in question to the classpath above ?


- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message