当前位置: 代码迷 >> Eclipse >> Servlet.service() for servlet [validation] in context with path [/User] threw e解决思路
  详细解决方案

Servlet.service() for servlet [validation] in context with path [/User] threw e解决思路

热度:70   发布时间:2016-04-23 13:35:45.0
Servlet.service() for servlet [validation] in context with path [/User] threw e
麻烦各位高手帮忙看看: 
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试试。

------解决方案--------------------
右键工程项目,选择source -》clear up
代码迷推荐解决方案:Servlet.service() for servlet default threw exception,http://www.daimami.com/search?q=181756
  相关解决方案