如果不手動把這兩個 jar 放到 tomcat 的 common/lib 就不能跑
第一個是 ant.jar (from netbean directory) , 另外一個是 tools.jar (from JDK)
一開始錯誤是:
exception
javax.servlet.ServletException: org/apache/tools/ant/BuildException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
javax.servlet.ServletException: org/apache/tools/ant/BuildException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
放 ant.jar 後會有第二個問題:
org.apache.jasper.JasperException: Unable to compile class for JSPThis can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
沒有留言:
張貼留言