ssh模式下从JSP页面获取值报异常

问题描述

2011-04-1213:03:24SettingparamsD1=>[请选择...]T10=>[]service.svrDeal=>[运费自承担123]2011-04-1213:03:24EnteringnullPropertyValue[target=[com.opensymphony.xwork2.DefaultTextProvider@bb6255],property=theme]2011-04-1213:03:24EnteringnullPropertyValue[target=[com.opensymphony.xwork2.DefaultTextProvider@bb6255],property=theme]2011-04-1213:03:24EnteringnullPropertyValue[target=org.apache.struts2.util.AttributeMap@11050be,property=theme]2011-04-1213:03:24ErrorsettingvalueCaughtanOgnlexceptionwhilegettingpropertyservice-Class:ognl.OgnlRuntimeFile:OgnlRuntime.javaMethod:getMethodValueLine:1416-ognl/OgnlRuntime.java:1416:-1atcom.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:130)atognl.OgnlRuntime.getProperty(OgnlRuntime.java:2210)atognl.ASTProperty.getValueBody(ASTProperty.java:114)atognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)atognl.SimpleNode.getValue(SimpleNode.java:258)atognl.ASTChain.setValueBody(ASTChain.java:222)atognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)atognl.SimpleNode.setValue(SimpleNode.java:301)atognl.Ognl.setValue(Ognl.java:737)atcom.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)atcom.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:161)atcom.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:149)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atcom.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)atorg.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)atorg.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)atorg.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)atorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)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:286)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:619)Causedby:ognl.OgnlException:service[java.lang.NullPointerException]atognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1416)atognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60)atognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147)atcom.opensymphony.xwork2.ognl.accessor.ObjectAccessor.getProperty(ObjectAccessor.java:17)atognl.OgnlRuntime.getProperty(OgnlRuntime.java:2210)atcom.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:125)...61moreCausedby:java.lang.NullPointerExceptionatcom.action.CustomerAction.getService(CustomerAction.java:74)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:830)atognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1414)...66more

解决方案

解决方案二:
这不是空指针异常吗?
解决方案三:
看看值有没有获得呗...

时间: 2025-01-19 16:45:21

ssh模式下从JSP页面获取值报异常的相关文章

验证码-为什么一个jsp页面获取另一个jsp页面保存的session值为空呢?

问题描述 为什么一个jsp页面获取另一个jsp页面保存的session值为空呢? 在Javaweb中,我用一个jsp页面生成一个验证码图片并用session保存图片上的数字,然后又在另一个denglu.jsp页面用标签导入该图片,可是首次打开denglu.jsp时图片上有显示数字(我在denglu.jsp我也同时输出验证码的值)我发现第一次访问时session的值为null之后在访问就是session就是记录图片上一次的值(比如刚启动服务器打开denglu.jsp,图片上的值为1234,那么se

jsp页面获取session值,第一次取值为空,必须要重新刷新页面,才能取到,求高手指点,急!!!

问题描述 action里面打印有值,但是在jsp页面取值却没有,debug也显示是空的,非要刷新一次才能取到​ 解决方案 解决方案二:.....没看懂,估计不是你贴出来的原因解决方案三:增加一行刷新缓冲区的代码试试解决方案四:jsp页面在加载的时候会编译成servlet,而servlet则会展示给我们想要的页面,这个编译过程会把标签,el语句等等也编译,这个时候只是页面的加载,这个时候还没有访问你的action,所以在session中的action_name是空,等页面加载完成后会访问ajax,

java-Java jsp页面获取文本框的改变

问题描述 Java jsp页面获取文本框的改变 通过点击树来改变文本框的值,用onChange捕获不到,用onpropertychange只适用于IE浏览器,怎么办? 解决方案 defineSetter重新定义下value属性 标准浏览器下oninput如何响应javascript动态设置值 解决方案二: onBlur可以,以前遇到过同样的问题,是焦点失去时触发

jsp 网站开发-为什么做的jsp页面传不了值

问题描述 为什么做的jsp页面传不了值 A页面:<%String rq =request.getParameter(""SubmitDate"");String today =rs.getString(""TODAY"");%>form id=""tab_list"" method=""post"" action=""

jsp页面获取系统时间写入后台数据库

问题描述 jsp页面获取系统时间写入后台数据库 我使用的是ssh框架,在user表中有个user_registertime是Date类型,想从jsp中获取系统时间写入到user中作为user_registertime,求教各位大神该怎么处理? 解决方案 为什么要从jsp获取时间,直接在sql中调用date函数就可以得到时间了. 解决方案二: 如果你用的是mysql 直接写 now() 就把当前时间加入数据库了 解决方案三: <%=new SimpleDateFormat(""yy

在JSP页面获取后台action封装的参数,这个参数里面又含有两个对象,二层引用,报错

问题描述 在JSP页面获取后台action封装的参数,这个参数里面又含有两个对象,二层引用,报错 javax.el.PropertyNotFoundException: Property 'userAccount' not found on type java.lang.String 上面是报错信息, 下面是JSP页面: 用户名: ${commentlist.userAccount.userName } 职业: ${commentlist.userAccount.job } ${commentl

spring mvc-spring MVC jsp页面获取参数 以对象的方式

问题描述 spring MVC jsp页面获取参数 以对象的方式 jsp里面的body部分 <h1>用户信息添加2</h1> <form action="user/add3.do" method="post"> 编号:<input type="text" name="userId"/><br/> 姓名:<input type="text" n

jsp-表单提交数据之后,JSP页面获取不到,这是什么问题呢?

问题描述 表单提交数据之后,JSP页面获取不到,这是什么问题呢? <from action="research.jsp" method="post"> 请输入你的id号:<input type="text" name="id"><br> <input type="submit" value="提交"> </from> <b

linux下jsp报错问题-jsp页面在linux报错问题

问题描述 jsp页面在linux报错问题 HTTP Status 500 - javax.servlet.ServletException: File ""/jsp/base/header.jsp"" not found type Exception report message javax.servlet.ServletException: File ""/jsp/base/header.jsp"" not found de