问题描述
action里gg可以取到值了!setDoortypename的时候报空指针错误!!Stringgg=request.getParameter("add1");foolAddForm.getBasdoor().setDoortypename(gg);
解决方案
解决方案二:
错误信息2010-05-0600:18:05,260WARN[org.apache.struts.action.RequestProcessor]-UnhandledExceptionthrown:classjava.lang.NullPointerException2010-5-60:18:05org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.yidu.greenhouse.struts.action.bas.FoolAddAction.execute(FoolAddAction.java:58)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:637)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.yidu.greenhouse.filter.EncoderFilter.doFilter(EncoderFilter.java:34)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)atjava.lang.Thread.run(UnknownSource)
解决方案三:
add1这个数据有吗?
解决方案四:
foolAddForm.getBasdoor()null回答完毕
解决方案五:
classjava.lang.NullPointerException空指针异常,肯定是你用null调用了某个方法...很有可能是foolAddForm.getBasdoor()这个为空!orfoolAddForm为空!
解决方案六:
表单指定了文件上传,request.getParameter(..),是取不到表单中的值的,只能取到地址栏的参数。
解决方案七:
foolAddForm.getBasdoor()是null
解决方案八:
额找到原因了!是因为配置文件有个小小的问题!