eclipse搭建struts1.3.10,jar包都引入,现在在类中无法识别System.out.println

警告: Unhandled exception java.lang.NullPointerException at action.LoginAction.execute(LoginAction.java:17) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org

第1个回答  2013-08-15
LoginAction.java:17
ExecuteAction.java:58
AbstractExecuteAction.java:67
ActionCommandBase.java:51
这四个文件你debug一下就知道哪里为Null了,不是什么无法识别System.out.println

追问



追答

嗯,是你的bean配置出错了!

第2个回答  2013-08-24
空指针,肯定是你LoginAction中有个变量没赋值,或者有个对象没注入依赖本回答被提问者采纳
第3个回答  2013-08-15
http://hi.baidu.com/couker/item/8b4d2aeeb2c022265b2d648c ,看能不能解决,最好Debug,看到哪一步出错的,我看上面这个帖子,应该是最后一部出错了
相似回答