初学java,按书上例子做的,tomcat报错:java.lang.NoClassDefFoundError: lee/DbDao
做的例子在http://download.csdn.net/source/2490769有下载。
之前有遇到过问题是
我手动到src/lee下javac LoginServlet.java
时,会报cannot find symbol错误,如果我把package lee去掉,就可以编译成功
网上查找了,应该是classpath的问题,但我不知道这个例子要怎么改
然后我把书附带的光盘源代码拷到相应的位置,直接运行tomcat
报错如下:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: lee/DbDao
lee.LoginServlet.service(LoginServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
我已经用了很久的时间了,但是什么都没有结果,java总是这么拒我以千里之外,绝望中,请大家帮帮我,谢谢了!