网上查了下,可能这两种情况:
第一种:
Linux version of catalina/bin/setclasspath.sh in 5.5.15,17,20 hides
the following classpath setting under condition. With tools.jar in
classpath it works.
if [ "$1" = "debug" -o "$1" = "javac" ] ; then
CLASSPATH="$JAVA_HOME"/lib/tools.jar
fi
Btw, setclasspath.bat does not contain such condition as well as
bat/sh of 5.0.28
Sounds odd, but it helped.
第二种:
servlet-api.jar is in common/lib.
Is the jar perchance in some other directory as well - such as inside
the webapp? It shouldn't be in more than one place.