首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

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

2013-09-11 
Servlet.service() for servlet [validation] in context with path [/User] threw e麻烦各位高手帮忙看看

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.myexception.cn/eclipse/181756.html

热点排行