Servlet.service() for servlet [validation] in context with path [/User] threw e
依米星灿 2012-02-09 10:32:29 麻烦各位高手帮忙看看:
org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [validation] in context with path [/User] threw exception
java.lang.NullPointerException
错误指向:at user.LoginValidation.doGet(LoginValidation.java:23)代码是:if (u.equals("cc")&&p.equals("123"))
如果是一下错误的第三条应如何在eclipse中clear一下工程啊?
java.lang.ClassNotFoundException: com.tsinghua.Login
从上面这句异常看是找不到类路径。
原因有这么几个:
1、如果你请求的url是一个servlet,检查web.xml中servlet的类路径是否正确,注意大小写;
2、如果你请求的url是一下struts action,检查一下struts配置文件中action的类路径是否正确,注意大小写;
3、如果上面两个办法还不能解决,则有可能是你的类没有被正确编译。在eclipse中clear一下工程,然后重启tomcat试试。