jsp页面提示The method getValue(String) from the type HttpSession is deprecated,项目运行报空指针。

之前运行项目没错,功能都可以正常打开,项目停了,再打开代码,jsp页面有黄线并提示The method getValue(String) from the type HttpSession is deprecated(第3行)
代码:

<%@ page language="java" contentType="text/html; charset=GBK"
    pageEncoding="GBK"%>
<%@ include file="/include/tld.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

点击相关功能,控制台报错

2019-05-17 16:20:03,165 [http-8083-Processor15] ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/BZLXT].[jsp]] - Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37)
    at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596)
    at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390)
    at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295)
    at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207)
    at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
    at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159)
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:662)
2019-05-17 16:20:27,381 [http-8083-Processor15] ERROR [com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor] 

Stacktrace:
org.apache.jasper.JasperException: 


Stacktrace:
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
    at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159)
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37)
    at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596)
    at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390)
    at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295)
    at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207)
    at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    ... 76 more
org.apache.jasper.JasperException:
Stacktrace:
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
    at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159)
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37)
    at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596)
    at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390)
    at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295)
    at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207)
    at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820)
    at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    ... 76 more
2019-05-17 16:22:32,434 [http-8083-Processor15] ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/BZLXT].[default]] - Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:405)
    at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:771)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:506)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:662)

页面显示:,<br> 其他功能还可以正常使用,项目使用spring,Struts,Ibatis搭建的,求助大佬,感谢!</p>

0

1个回答

这个提示方法废弃但是不影响运行,根源是空指针,定位到空指针的地方,看看是不是页面传递参数时为空的呢?

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
The method readLine() from the type DataInputStream is deprecated
import java.io.*;rnrnpublic class TestreadLine rnrn public static void main(String[] args) throws IOException rn DataInputStream in = new DataInputStream(System.in);rn String str;rn System.out.println("Enter lines of text");rn System.out.println("Enter 'End' to quit!");rn do rn str = in.readLine(); //在readline上出现了删除线 并出现如标题提示rn System.out.println(str);rn while(!str.equals("End"));rn rnrnrnrnrn提示:The method readLine() from the type DataInputStream is deprecatedrnrn程序仍可正常执行 不知道提示什么意思 请高手解答下
The method getAttribute(String) in the type HttpSession is not applicable fo
The method getAttribute(String) in the type HttpSession is not applicable for the arguments (boolean)中getAttribute获取不到
The method setBackgroundDrawable(Drawable) from the type View is deprecated求解
代码如下rnpackage com.example.helloandroid;rnrnimport android.app.Activity;rnimport android.os.Bundle;rnimport android.view.MotionEvent;rnimport android.view.View;rnimport android.view.View.OnTouchListener;rnimport android.widget.ImageButton;rnrnpublic class MainActivity extends Activity rnrn private ImageButton Ibtn;rnrn @Overridern public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn Ibtn = (ImageButton)findViewById(R.id.imageBtn);rn Ibtn.setOnTouchListener(new OnTouchListener()rn @Overridern public boolean onTouch(View v, MotionEvent event)rn if(event.getAction() == MotionEvent.ACTION_DOWN)rn Ibtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.press));rn rn else if(event.getAction() == MotionEvent.ACTION_UP)rn Ibtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.nopress));rn rn return false;rn rn );rn rnrnrnrnrn其中setBackgroundDrawable函数中间打了一条横线,不能被用,为什么?rn
编译提示deprecated conversion from string constant to 'char*''?
我在结构体中定义的是:rnstruct Nodernrnchar Section[32];rn;rnrn然后rnprintf("%s\n",Section);rnrn编译器会提示:rnrndeprecated conversion from string constant to 'char*''rn请问这个该怎么修改?rn谢谢!
Error:The method equlas(String) is undefined for the type String
///////////////rn// 代码如下rn///////////////rn<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" rnerrorPage="" %>rnrn<%@ page import="ccc.*" %>rnrnrnrnrnrnrn<%! int n=0; %>rnrn<%! public String codeString(String s)rn rn String str = s;rn tryrn byte b[] = str.getBytes("ISO-8859-1");rn str = new String(b);rn return str;rn rn catch(Exception e)rn rn return str;rn rn rn%>rnrnrn rn create.jsprnrnrn <%@ include file="head.txt" %>rn rn rn rn rn rn rn rn <% String name="", title="", content="";rn rn name = request.getParameter("name");rn if(name==null)rn rn name="匿名";rn rn title = codeString(title);rn rn title = request.getParameter("title");rn if(title==null)rn rn title="";rn rn title = codeString(title);rn rn content = request.getParameter("content");rn if(content==null)rn rn content="";rn rn content = codeString(content);rn %>rn rn <% long n = System.currentTimeMillis();rn String time = String.valueOf(n);rn %>rn rn <% boolean b=!(title.equals(""))&&!(content.equlas(""));rn //boolean b=true;rn if(b)rn rn %>rn rn rn rn <%rn String id = "";rn if(addbbslist.add())rn rn id = returnid.getID();rn %> rn <% if(create.add(id))rn rn %> rn rn rn rn rn <% if(insert.add())rn rn out.printrn("success!");rn rn elsern rn out.print("在rncreate.jsp 89行 insert.add() 出现错误!");rn rn rn elsern rn out.print("在create.jsp 82rn行 create.add(id) 出现错误!");rn rn rn elsern rn out.print("在create.jsp 78行 rnaddbbslist.add() 出现错误!");rn rn rn %>rnrnrn///////////////////////rn// 下面是错误信息:rn//////////////////////*rnAn error occurred at line: 68 in the jsp file: /create.jsprnGenerated servlet error:rnThe method equlas(String) is undefined for the type Stringrn/////////////////////*/rn// JDK1.5 + Tomcat 5.5rn
The method addBatch(String) is undefined for the type String
String.addBatch(sql1);报错rn这是 DAOTest类rn[code=java]rnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnrnpublic class DAOTest rn Connection conn;rn Statement stmt;rn ResultSet rs;rn public Connection getConn() rn return conn;rn rn public Statement getStmt() rn return stmt;rn rn public ResultSet getRs() rn return rs;rn rn public DAOTest(Connection conn) rn this.conn=conn;rn try rn stmt=conn.createStatement();rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn public void createTable() throws SQLException rn stmt.executeUpdate("drop table if exists 'jdbc_test'");rn String sql="create table jdbc_test(id int,name varchar(100))";rn stmt.executeUpdate(sql);rn System.out.println("jdbc_test表建立完成");rn rn public void insert() throws SQLExceptionrn String sql1="insert into jdbc_test values(1,'tom')";rn String sql2="insert into jdbc_test values(2,'张三')";rn String sql3="insert into jdbc_test values(3,'999')";rn String.addBatch(sql1);rn String.addBatch(sql2);rn String.addBatch(sql3);rn rn int[] results=stmt.executeBatch();rn for(int i=0;i
deprecated conversion from string constant to 'char*'
std::map m = parseOptions("heap:dump,file:xxx.txt");rnrn函数定义如下:rnstd::map parseOptions(const char* options);rnrn为啥会报出 deprecated conversion from string constant to 'char*'?rn方法参数已经是 const 了啊。rnrn编译器是 gcc 4.2.1
warning: deprecated conversion from string constant to ‘char*’|
warning: deprecated conversion from string constant to ‘char*’|rnrn成員函數共有兩个rnrnrnsetValue(string) 及 setValue(char*);rnrn調用時用 clazz.setValue("99999999999999999999999");rnrn就出現了上述警告rnrn问题:它优先自动調用 setValue(string) 不就行了?
使用IBatis做个项目,运行的时候报如下错误Could not load type from string value 'BindGameIDInfo'.
我是参照NPetShop写的,请遇到相同错误的大侠给以解答。谢谢!rnrnrn详细错误如下:rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.TypeLoadException: Could not load type from string value 'BindGameIDInfo'.rnrn源错误: rnrnrn行 34: rn行 35: DomDaoManagerBuilder builder = new DomDaoManagerBuilder();rn行 36: builder.ConfigureAndWatch("dao.config", handler);rn行 37: rn行 38: _instance = new ServiceConfig();rn rnrn源文件: E:\WorkSpace\Asp.net\CardManagerSystem\CMS.Service\ServiceConfig.cs 行: 36 rnrnrnrn堆栈跟踪: rnrnrn[TypeLoadException: Could not load type from string value 'BindGameIDInfo'.]rn IBatisNet.Common.Utilities.TypesResolver.TypeResolver.ResolveType(String typeName) +272rn IBatisNet.Common.Utilities.TypesResolver.TypeResolver.Resolve(String typeName) +69rn IBatisNet.Common.Utilities.TypesResolver.CachedTypeResolver.Resolve(String typeName) +298rn IBatisNet.Common.Utilities.TypeUtils.ResolveType(String typeName) +66rn IBatisNet.DataMapper.Configuration.Alias.TypeAlias.Initialize() +40rn IBatisNet.DataMapper.Configuration.Serializers.TypeAliasDeSerializer.Deserialize(XmlNode node, ConfigurationScope configScope) +289rn IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap() +1303rn IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize() +5192rn IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) +384rnrn[ConfigurationException: rn- The error occurred while loading SqlMap.rn- initialize type aliasrn- The error occurred in . rn- Check the BindGameIDInfo.]rn IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) +483rn IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, NameValueCollection properties) +77rn IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.Configure(NameValueCollection properties, IDictionary resources) +798rnrn[ConfigurationException: DaoManager could not configure SqlMapDaoSessionHandler.Cause: rn- The error occurred while loading SqlMap.rn- initialize type aliasrn- The error occurred in . rn- Check the BindGameIDInfo.]rn IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.Configure(NameValueCollection properties, IDictionary resources) +939rn IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetContexts(ConfigurationScope configurationScope) +2502rn IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetConfig(ConfigurationScope configurationScope) +61rn IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers(XmlDocument document, Boolean useConfigFileWatcher) +265rnrn[ConfigurationException: rn- The error occurred while configure DaoSessionHandler.rn- The error occurred in . rn- Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.]rn IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers(XmlDocument document, Boolean useConfigFileWatcher) +338rn IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate) +171rn CMS.Service.ServiceConfig.GetInstance() in E:\WorkSpace\Asp.net\CardManagerSystem\CMS.Service\ServiceConfig.cs:36rn CMS.Service.RegTypeInfoService..ctor() in E:\WorkSpace\Asp.net\CardManagerSystem\CMS.Service\RegTypeInfoService.cs:25rn CMS.Service.RegTypeInfoService..cctor() in E:\WorkSpace\Asp.net\CardManagerSystem\CMS.Service\RegTypeInfoService.cs:15rnrn[TypeInitializationException: “CMS.Service.RegTypeInfoService”的类型初始值设定项引发异常。]rn CMS.Service.RegTypeInfoService.GetInstance() in E:\WorkSpace\Asp.net\CardManagerSystem\CMS.Service\RegTypeInfoService.cs:36rn _Default.BindDDL() in e:\WorkSpace\Asp.net\CardManagerSystem\CMS.Web\Default.aspx.cs:28rn _Default.Page_Load(Object sender, EventArgs e) in e:\WorkSpace\Asp.net\CardManagerSystem\CMS.Web\Default.aspx.cs:19rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35rn System.Web.UI.Control.OnLoad(EventArgs e) +99rn System.Web.UI.Control.LoadRecursive() +50rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627rnrn rn
SSH项目报空指针错误
[color=#FF0000]错误提示:java.lang.NullPointerException[/color]rn org.hr.action.UserAction.login(UserAction.java:33)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rnrn[color=#FF0000]登录的jsp:login.jsp[/color]rn<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>rn<%@ taglib prefix="s" uri="/struts-tags" %>rnrnrn rn 人事管理-系统登录rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn /login.jsprn rn rn /index.jsprn /login.jsprn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn 系统登录rn rn rn rn rn rn rn rn rn 用户名:rn rn rn rn rn rn rn rn 密码:rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn[color=#FF0000]UserAction报错的地方:[/color]rn public String login() throws Exceptionrn rn System.out.println("test");rn [color=#FF0000]Users user=userservice.check(users.getUserName(),users.getUserPwd());[/color]rn if(users!=null)rn rn Map session=(Map)ActionContext.getContext().getSession();rn session.put("user",user);rn this.users=null;rn return SUCCESS;rn elsern rn return ERROR;rn rn rn[color=#FF0000]struts的配置:[/color]rnrnrn rn[color=#FF0000]applicationContext的相关配置:[/color]rn rn rn rn并且struts-spring-plugin插件也放进去了。求各位大佬知道
resin4启动项目报空指针
项目部署在resin3.1.12下能正常启动,部署在resin4.0.3的时候报空指针异常,报错如下图:rn[img=https://img-bbs.csdn.net/upload/201312/29/1388322093_440745.jpg][/img]rn求大神帮助啊!
问题:The method add(String, Component) in the type Container......
[color=#0000FF]程序1:[/color]rnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnrnpublic class Bounce rn rn public static void main(String[] args) rn EventQueue.invokeLater(new Runnable()rn rn public void run()rn rn JFrame frame=new BounceFrame();rn frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn frame.setVisible(true);rn rn rn );rnrn rnrnrnrnclass BounceFrame extends JFramernrn public BounceFrame()rn rn setSize(DEFAULT_WIDTH,DEFAULT_HEIGH);rn setTitle("Bounce");rn comp=new BallComponent();rn [color=#FF0000]add(comp,BorderLayout.CENTER);[/color]rn JPanel buttonPanel=new JPanel();rn addButton(buttonPanel,"Start",new ActionListener()rn rn public void actionPerformed(ActionEvent event)rn rn addBall();rn rn );rn addButton(buttonPanel,"Close",new ActionListener()rn rn public void actionPerformed(ActionEvent event)rn rn System.exit(0);rn rn );rn rn rn public void addButton(Container c, String title, ActionListener listener)rn rn JButton button=new JButton(title);rn c.add(button);rn button.addActionListener(listener);rn rn public void addBall()rn rn tryrn rn Ball ball=new Ball();rn comp.add(ball);rn for(int i=1;i<=STEPS;i++)rn rn [color=#FF0000]ball.move(comp.getBounds());rn comp.paint(comp.getGraphics());[/color] Thread.sleep(DELAY);rn rn catch(InterruptedException e)rn rn rn rn rn private BallComponent comp;rn public static final int DEFAULT_WIDTH=450;rn public static final int DEFAULT_HEIGH=350;rn public static final int STEPS=1000;rn public static final int DELAY=3;rnrn[color=#0000FF]程序2:[/color]rnimport java.awt.geom.Ellipse2D;rnimport java.awt.geom.Rectangle2D;rnrnrnpublic class Ball rnrn public void move(Rectangle2D bounds)rn rn x+=dx;rn y+=dy;rn if( x =bounds.getMaxX())rn rn x=bounds.getMaxX()-XSIZE;rn dx=-dx;rn rn if(y=bounds.getMaxY())rn rn y=bounds.getMaxY()-YSIZE;rn dy=-dy;rn rn rn public Ellipse2D getShape()rn rn return new Ellipse2D.Double(x,y,XSIZE,YSIZE);rn rnprivate static final int XSIZE=15;rnprivate static final int YSIZE=15;rn private double x=0;rn private double y=0;rn private double dx=1;rn private double dy=1;rn rnrn[color=#3366FF]程序3:[/color]rnrnimport java.awt.*;rnimport java.util.*;rnimport javax.swing.*;rnpublic class BallComponent rn public void add(Ball b)rn rn balls.add(b);rn rn public void paintComponent(Graphics g)rn rn [color=#FF0000]super.paintComponent(g);[/color] rn Graphics2D g2=(Graphics2D) g;rn for(Ball b : balls)rn rn g2.fill(b.getShape());rn rn rn rn private ArrayList balls=new ArrayList();rnrn在程序1中红色部分是有错误的,报错信息如下:rnThe method add(String, Component) in the type Container is not applicable for the arguments (BallComponent, String)rn The method getBounds() is undefined for the type BallComponentrn The method getGraphics() is undefined for the type BallComponentrn请问为什么会报着几个错误,该如何进行修改?rn在程序3中红色部分也是有错误的,不知道出错原因是什么?rn请高人帮忙解答一下,非常感谢。rn因为下面写不了了,只有在这儿写了,经过下面的修改后,再在程序1中加一行代码add(comp,BorderLayout.CENTER);就OK 了
The method wirte(String) is undefined for the type FileWriter
各位看官,帮忙看看,自己看了好久硬是没出来rnfw.write("\");theFloaters.play();");rnfw.wirte("\");theFloaters.addItem('followDiv2',1,'document.documentElement.clientHeight-458',\"");rn第一句不会报错 但是第二句会报错rn这个是什么原因啊~rn谢谢了!
The method getbean(String) is undefined for the type StuNewAddAction
package com.yourcompany.struts.action;rnimport java.util.List;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport org.apache.commons.beanutils.BeanUtils;rnimport org.apache.struts.action.Action;rnimport org.apache.struts.action.ActionForm;rnimport org.apache.struts.action.ActionForward;rnimport org.apache.struts.action.ActionMapping;rnrnrnimport com.yourcompany.struts.form.StuNewAddForm;rnimport com.yourcompany.struts.form.StuNewForm;rnimport com.yourcompany.struts.model.StuNew;rnimport com.yourcompany.struts.service.StuNewManager;rnrnpublic class StuNewAddAction extends Actionrn rn public ActionForward execute(ActionMapping mapping, ActionForm form,rn HttpServletRequest request, HttpServletResponse response)rn throws Exception rn rn String method =request.getParameter("method");rn System.out.println("method====stu=====" + method);rn rn if(method.equals("query"))rn return query(mapping, form, request, response);rn if(method.equals("add"))rn return add(mapping,form,request,response);rn if(method.equals("save"))rn return save(mapping,form,request,response); rn rn return null;rn rnrn rnrn private ActionForward save(ActionMapping mapping, ActionForm form, rn HttpServletRequest request, HttpServletResponse response) rn throws Exceptionrn StuNewAddForm mf =(StuNewAddForm)form;rn StuNew stuNew =new StuNew();rn BeanUtils.copyProperties(stuNew,mf);rn rn StuNewManager bm =(StuNewManager) getbean("stuNewManager");rn [color=#FF0000]这里报错 The method getbean(String) is undefined for the type StuNewAddAction[/color]rn return null;rn rnrnrnrn /** rn * 学生信息小窗口rn * Method execute "query" 显示页面rn * @param mappingrn * @param formrn * @param requestrn * @param responsern * @return ActionForward 返回页面rn */rn // 显示rn private ActionForward add(ActionMapping mapping, ActionForm form, rn HttpServletRequest request, HttpServletResponse response) throws Exceptionrn System.out.println("method====add=====" );rn return query(mapping, form, request, response);rn rnrn private ActionForward query(ActionMapping mapping, ActionForm form, rn HttpServletRequest request, HttpServletResponse response) throws Exceptionrn rn return mapping.findForward("StuNewAddPage");rn rnrnrnrnrnrnrn[color=#FF0000]这个错误该怎么办啊??我是在Action里写的rnrn下面是我的WEB.xml[/color]rnrnrnrnrn rn actionrn rn org.apache.struts.action.ActionServletrn rn rn configrn /WEB-INF/struts-wdy.xmlrn rn rn debugrn 3rn rn rn detailrn 3rn rn 0rn rn rn actionrn *.dorn rn rn rn /WEB-INF/c.tldrn /WEB-INF/c.tldrn rn rn /WEB-INF/cinko.tldrn /WEB-INF/cinko.tldrn rn rn /tags/ecsidern /WEB-INF/ecside.tldrn rn rn /WEB-INF/fmt.tldrn /WEB-INF/fmt.tldrn rn rn /tags/ecrn rn /WEB-INF/extremecomponents.tldrn rn rn rn /tags/jsrn /WEB-INF/jsrn rn rn /WEB-INF/css.jsprn /WEB-INF/css.jsprn rn rn /tags/struts-beanrn /WEB-INF/struts-bean.tldrn rnrn rn /tags/struts-htmlrn /WEB-INF/struts-html.tldrn rnrn rn /tags/struts-logicrn /WEB-INF/struts-logic.tldrn rn rn /tags/struts-tilesrn /WEB-INF/struts-tiles.tldrn rn rn rn rnrnrn
The method add(string) in the type ArrayList is not applicable for the a
rnimport java.util.ArrayList;rnrnpublic class APP2 rnrn public static void main(String[] args) rn ArrayList list = new ArrayList();rn list.add("SE");rn list.add("EE");rn list.add("ME");rn list.add("SE");rn list.add("EE");rn list.remove("SE");rn System.out.print(list);rn rnrnrnrn为什么add这里显示The method add(string) in the type ArrayList is not applicable for the arguments (String)rn编译错误,求解
The method getSumByNum(String) is undefined for the type CardInfoDao
[code=Java]org.apache.jasper.JasperException: Unable to compile class for JSP: rnrnAn error occurred at line: 439 in the jsp file: /index.jsprnThe method getSumByNum(String) is undefined for the type CardInfoDaorn436: PayInfo payInfo1=(PayInfo)payInfos1.get(i);rn437: eSum = Integer.parseInt(payInfo1.getCardNum().substring(10,12));rn438: int moneySum = 0;rn439: moneySum = cid1.getSumByNum(payInfo1.getCardNum());rn440: %>rn441: rn442: rnrnrnStacktrace:rn org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)rn org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)rn org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)[/code]rn有getSumByNum这个方法,public int getSumByNum(String cardNum)rnrn上文中有定义CardInfoDao cid1 = new CardInfoDao();rnrnpayInfo1.getCardNum()返回的是String。rnrn请高手帮忙看一下会是哪里的问题,在线等。。。
错误:The method getParemeter(String) is undefined for the type HttpServletRequest
(1)功能:采用JSP + Servlet 实现网络磁盘rn(2)Servlet、JSP调用关系:rn DiskServlet.java 显示跟磁盘目录rn DirServlet.java 显示该目录下得文件以及文件夹rn ReadServlet.java 读取文件中的内容rn rn create.jsp 创建新文件/文件夹 输入页面rn WriteServlet.java 创建新的文件/文件夹rn(3)问题:rn在DirServlet.java中有创建文件的链接:rn out.println("[" + "创建文件/文件夹]");rn //file.getAbsolutePath()为取得当前的目录rn在create.jsp中读取传入的path参数rnrn <%rn request.setCharacterEncoding("utf-8");rn String path = request.getParemeter("path");rn %>rnrn在MyEclipse8.5、Tomcat_6.0.35部署好之后访问“创建文件的链接”(即create.jsp) 报错:rnrnorg.apache.jasper.JasperException: Unable to compile class for JSP: rnrnAn error occurred at line: 5 in the jsp file: /create.jsprnThe method getParemeter(String) is undefined for the type HttpServletRequestrn2: rn3: <%rn4: request.setCharacterEncoding("utf-8");rn5: String path = request.getParemeter("path");rn6: %>rn7: rn8: rnrnrnStacktrace:rn org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)rn org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)rn org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnrnrnrequest对象的getParameter(String)方法没有定义呢?该如何解决呢?rn
问题~the method setCharacterEncoding(string) is undefined for the type HttpServletResponse
package com.shop.filter;rnrnimport java.io.IOException;rnrnimport javax.servlet.Filter;rnimport javax.servlet.FilterChain;rnimport javax.servlet.FilterConfig;rnimport javax.servlet.ServletException;rnimport javax.servlet.ServletRequest;rnimport javax.servlet.ServletResponse;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnpublic class CharFilter implements Filterrnrn public void init(FilterConfig arg0) throws ServletException rn // TODO Auto-generated method stubrn rn rnrn public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException rn HttpServletRequest hr=(HttpServletRequest)arg0;rn HttpServletResponse hrs=(HttpServletResponse)arg1;rn hr.setCharacterEncoding("gb2312");rn[color=#FF0000] hrs.setCharacterEncoding("gb2312");[/color]rn rn arg2.doFilter(arg0,arg1);rnrn rnrn public void destroy() rn // TODO Auto-generated method stubrn rn rnrn
The method getParametersValues(String) is undefined for the type HttpServletRequest
while(rs.next())rn %>rn rn >rn <%=rs.getObject(3)%>rn <%=rs.getObject(4)%>rn <%=rs.getObject(5)%>rn rn rn <%rn点击提交以后 我用这2句代码去获取 SCORE 和 STUDENT_ID的内容rnString[] xuehaos=request.getParametersValues("student_id").trim();rnString[] scores=request.getParametersValues("score").trim();rn这2行代码执行的时候报错:rnThe method getParametersValues(String) is undefined for the type HttpServletRequestrn方法未定义......rn什么意思 大家解释一下什么原因啊!rn
如何解决The method getIdcard() is undefined for the type String
这事封装对象的代码rnpackage cn.itcast.domain;rnrnpublic class Student rnrn private String idcard;rn private String examid;rn private String name;rn private String location;rn private double grade;rn rn rn public String getIdcard() rn return idcard;rn rn public void setIdcard(String idcard) rn this.idcard = idcard;rn rn public String getExamid() rn return examid;rn rn public void setExamid(String examid) rn this.examid = examid;rn rn public String getName() rn return name;rn rn public void setName(String name) rn this.name = name;rn rn public String getLocation() rn return location;rn rn public void setLocation(String location) rn this.location = location;rn rn public double getGrade() rn return grade;rn rn public void setGrade(double grade) rn this.grade = grade;rn rn rnrn这事操作代码rnimport cn.itcast.utils.XmlUtils;rnrnpublic class StudentDao rnrnrn public void add(String s)rn rn try rn Document document = XmlUtils.getDocument();rn rn //创建封装学生信息的标签rn Element student_tag = document.createElement("student"); rn student_tag.setAttribute("idcard", s.getIdcard());rn student_tag.setAttribute("examid", s.getExamid()); rn rn catch (Exception e) rn throw new RuntimeException(e);rn rn rn rnrn这里的getIdcard()和getExamid()方法会出现The method getIdcard() is undefined for the type String的错误啊!
The method list(String, Object[]) is ambiguous for the type BaseHibernateDao
@Overridern public List listAll(int pn, int pageSize) rn return list(HQL_LIST_ALL, pn, pageSize);rn rn rn @Overridern public List pre(PK pk, int pn, int pageSize) rn if(pk == null) rn return list(HQL_LIST_ALL, pn, pageSize);rn rn //倒序,重排rn List result = list(HQL_OPTIMIZE_PRE_LIST_ALL, 1, pageSize, pk);rn Collections.reverse(result);rn return result;rn rn @Overridern public List next(PK pk, int pn, int pageSize) rn if(pk == null) rn return list(HQL_LIST_ALL, pn, pageSize);rn rn return list(HQL_OPTIMIZE_NEXT_LIST_ALL, 1, pageSize, pk);rn rnrn @Overridern public void flush() rn getSession().flush();rn rnrn @Overridern public void clear() rn getSession().clear();rn rnrn protected long getIdResult(String hql, Object... paramlist) rn long result = -1;rn List list = list(hql, paramlist);rn if (list != null && list.size() > 0) rn return ((Number) list.get(0)).longValue();rn rn return result;rn rnrn protected List listSelf(final String hql, final int pn, final int pageSize, final Object... paramlist) rn return this. list(hql, pn, pageSize, paramlist);rn rnrnrn /**rn * for inrn */rn @SuppressWarnings("unchecked")rn protected List listWithIn(final String hql,final int start, final int length, final Map> map, final Object... paramlist) rn Query query = getSession().createQuery(hql);rn setParameters(query, paramlist);rn for (Entry> e : map.entrySet()) rn query.setParameterList(e.getKey(), e.getValue());rn rn if (start > -1 && length > -1) rn query.setMaxResults(length);rn if (start != 0) rn query.setFirstResult(start);rn rn rn List results = query.list();rn return results;rn rnrn @SuppressWarnings("unchecked")rn protected List list(final String hql, final int pn, final int pageSize, final Object... paramlist) rn Query query = getSession().createQuery(hql);rn setParameters(query, paramlist);rn if (pn > -1 && pageSize > -1) rn query.setMaxResults(pageSize);rn int start = PageUtil.getPageStart(pn, pageSize);rn if (start != 0) rn query.setFirstResult(start);rn rn rn if (pn < 0) rn query.setFirstResult(0);rn rn List results = query.list();rn return results;rn rn
The method getParmaeter(String) is undefined for the type HttpServletRequest
<%@ page pageEncoding="gb2312"%>rn<%@ page contentType="text/html; charset=gb2312" language="java" %>rn<% request.setCharacterEncoding("gb2312");%>rnrn<%@ page import="java.sql.*" errorPage="" %>rn<%@ page import="javabean.*" %>rn<%@ page import="java.util.Date" %>rn<%@ page import="java.text.*" %>rnrnrnrnrnrn rn 注册检查rnrnrnrnrn<%rnrequest.setCharacterEncoding("gb2312");rnString rand = (String)session.getAttribute("rand");rnString input=request.getParameter("rand");rnrnif (rand.equals(input)) rn rn try rn request.setCharacterEncoding("gb2312"); rn String str_name=request.getParameter("username");rn String sqlname="select * from tb_user where username='"+str_name+"'"; //表名userrn ResultSet rsname=sqlbean.executeQuery(sqlname);rn if(rsname.next()) //判断是否有雷同的数据存在,即判断是否有已注册的用户名。rn out.println(" "); rn elsern request.setCharacterEncoding("gb2312");rn String str_datatime=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getDate());rn String str_password=request.getParameter("password");rn String str_password2=request.getParameter("password2");rn String str_sex=request.getParameter("sex");rn String str_email=request.getParameter("email");rn String str_question=request.getParameter("question");rn String str_answer=request.getParameter("answer");rn String str_qq=request.getParmaeter("qq");rn String str_words=request.getParameter("words");rn String sqlinsert="insert into tb_user (username,password,sex,email,question,answer,qq,str_datatime,words) values('"+str_name+"','"+str_password+"','"+str_sex+"','"+str_email+"','"+str_question+"','"+str_answer+"','"+str_qq+"',"+str_datatime+"','"+str_words+"')";rn out.println(" ");rn sqlbean.close(); rn catch(Exception ex)rn out.println(" "); rn rnelsern out.println(" "); rn%>rnrnrnrnrn<%@ page pageEncoding="gb2312"%>rn<%@ page contentType="text/html; charset=gb2312" language="java" %>rn<% request.setCharacterEncoding("GB2312");%>rnrnrnrnrn rn rn 用户注册rn rn rn rn rn rn rn rnrnrnrnrn rn rn rn rn rn  rn rn rn rn rn rn rn  rn rn rn rn rn *用 户 名: rn 用户名大于4小于20个字符rnrn rn *密 码:rn rn rn 密码大于6小于20个字符rnrn rn *重复密码: rn 必须与上面一致rnrn rn *电子邮箱: rnrnE-MAIL必须符合规则rnrn *性 别:rn 男 女rn 性别不能为空rnrnrn rn *QQ号码: rn rn qq不能为空rnrn rn *问 题:rn rnrnrn rn *答 案:rn rnrnrn rn 个人介绍:rn rnrn rn 看不清楚换一张rn rn rn rn 验证码:rn rn rn rnrnrnrn rn rn  rn rn rn rn rn rn rn  rn rn rn rn rn rnrnrn
The method executeUpdate(String) is undefined for the type DataBase
问题如下:rnorg.apache.jasper.JasperException: Unable to compile class for JSP: rnrnAn error occurred at line: 70 in the jsp file: /JavaBeanTest/Vote.jsprnThe method executeUpdate(String) is undefined for the type DataBasern67: ++count;rn68: //鏇存敼鏁版嵁搴撳唴瀹�rn69: String s1 = "update vote set count = " + count + " where id = " + s;rn70: int n = DataBase.executeUpdate(s1 );rn71: if ( n > 0)rn72: rn73: out.print( "鎶曠エ鎴愬姛!!");rnrnrnStacktrace:rn org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:95)rn org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)rn org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:367)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:345)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:342)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rnrnrn我的JSP页面:rn <%rn /*处理投票结果*/rn String s = request.getParameter("a");rn /*未投票,不作任何处理*/rn if (s != null)rn rn /*投票后,更改数据库*/rn elsern rn rs.next();rn rs = DataBase.executeQuery("select count from vote where id = " + s);rn int count = Integer.parseInt(rs.getString(1));rn ++count;rn //更改数据库内容rn String s1 = "update vote set count = " + count + " where id = " + s;rn int n = DataBase.executeUpdate(s1 );rn if ( n > 0)rn rn out.print( "投票成功!!");rn rn rn %>rnDataBase类:rnrnrn/*数据库连接类*/rnpackage com.db;rnimport java.sql.*;rnrnpublic class DataBase rn private static Connection con = null;rn private static Statement st = null;rn private static ResultSet rs = null;rn rn /*建立桥接器函数*/rn private static void forName()rn rn tryrn rn Class.forName("com.mysql.jdbc.Driver");rn rn catch (ClassNotFoundException e) rn rn e.printStackTrace();rn rn rn rn public static ResultSet executeQuery(String str)rn rn rn //建立桥接器rn forName();rn try rn rn //建立连接rn con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test1", "root", "");rn //建立SQL对象rn st = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);rn //执行查询rn rs = st.executeQuery(str);rn rn catch (SQLException e) rn rn e.printStackTrace();rn rn return rs;rn rn rn public static int executeUpdate(String str)rn rn int n = 0;rn //建立桥接器rn forName();rn try rn rn //建立连接rn con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test1", "root", "");rn //建立SQL对象rn st = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);rn //执行查询rn n = st.executeUpdate(str);rn rn catch (SQLException e) rn rn e.printStackTrace();rn rn return n;rn rnrnrn
C3P0错误:The type PoolConfig is deprecated
import com.mchange.v2.c3p0.ComboPooledDataSource;rnimport com.mchange.v2.c3p0.DataSources;rnimport com.mchange.v2.c3p0.PoolConfig;rnrn在创建C3P0的连接池工具rnPoolConfig pcfg = new PoolConfig();rn是报错 The type PoolConfig is deprecatedrnrn请问是什么原因造成的啊?rn我已导入了c3p0包
Could not load type from string value
[code=csharp][img=https://img-bbs.csdn.net/upload/201305/03/1367544096_418209.jpg][/img][/code]
请问 the method validate(String,String) is undefined for the type User是什么问题
[color=#FF0000]后台提示[/color]rnrnrnrn[color=#FF0000]validate方法[/color]rnrn public static User validate(String username, String password)rn throws UserNotFoundException, PasswordNotCorrectException rn User u = null;rn Connection conn = DB.getConn();rn String sql = "select * from user where username = '" + username + "'";rn Statement stmt = DB.getStmt(conn);rn ResultSet rs = DB.getRs(stmt, sql);rn try rn if (!rs.next()) rn throw new UserNotFoundException("用户不存在:" + username);rn else rn if (!password.equals(rs.getString("password"))) rn throw new PasswordNotCorrectException("密码不正确哦!");rn rn u = new User();rn u.setId(rs.getInt("id"));rn u.setUsername(rs.getString("username"));rn u.setPassword(rs.getString("password"));rn u.setPhone(rs.getString("phone"));rn u.setAddr(rs.getString("addr"));rn u.setRdate(rs.getTimestamp("rdate"));rn rnrn catch (SQLException e) rn e.printStackTrace();rn finally rn DB.close(rs);rn DB.close(stmt);rn DB.close(conn);rn rn rn return u;rn rnrnrn[color=#FF0000]login.jsp[/color]rnrn<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>rn<%@ page import="com.*" %>rn<%rnString username = request.getParameter("username");rnString password = request.getParameter("password");rnrntry rn User u = User.validate(username, password);rn session.setAttribute("user", u);rn catch (UserNotFoundException e) rn out.println(e.getMessage());rn return;rn catch (PasswordNotCorrectException e) rn out.println(e.getMessage());rn return;rnrnrnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rnrnrnrn rnrnrn rn rn rn rn rn rn rn rn 用户登录rn rn rn rn admin name:rn rn rn rn admin password:rn rn rn rn rn rn rnrnrn rnrnrnrnrn[color=#FF0000]User.java[/color]rnrnpackage com;rnrnimport java.sql.*;rnimport java.util.*;rnimport java.util.Date;rnrnimport com.util.DB;rnimport com.exception.*;rnrnpublic class User rn private int id;rn private String username;rn private String password;rn private String phone;rn private String addr;rn private Date Rdate;rnrn public int getId() rn return id;rn rnrn public void setId(int id) rn this.id = id;rn rnrn public String getUsername() rn return username;rn rnrn public void setUsername(String username) rn this.username = username;rn rnrn public String getPassword() rn return password;rn rnrn public void setPassword(String password) rn this.password = password;rn rnrn public String getPhone() rn return phone;rn rnrn public void setPhone(String phone) rn this.phone = phone;rn rnrn public String getAddr() rn return addr;rn rnrn public void setAddr(String addr) rn this.addr = addr;rn rnrn public Date getRdate() rn return Rdate;rn rnrn public void setRdate(Date rdate) rn Rdate = rdate;rn rnrn public void save() rn Connection conn = DB.getConn();rn String sql = "insert into user values(null,?, ?, ?, ?, ?) ";rn PreparedStatement pstmt = DB.getPStmt(conn, sql);rn try rn pstmt.setString(1, username);rn pstmt.setString(2, password);rn pstmt.setString(3, phone);rn pstmt.setString(4, addr);rn pstmt.setTimestamp(5, new Timestamp(Rdate.getTime()));rn pstmt.executeUpdate();rn catch (SQLException e) rn e.printStackTrace();rn finally rn DB.close(conn);rn rn rnrn // public static boolean userExists(String username)rn // //check the table to find out username exitstrn // return false;rn // rn // public static boolean isPasswordCorrect(String username)rn // return false;rn // rnrn public static User validate(String username, String password)rn throws UserNotFoundException, PasswordNotCorrectException rn User u = null;rn Connection conn = DB.getConn();rn String sql = "select * from user where username = '" + username + "'";rn Statement stmt = DB.getStmt(conn);rn ResultSet rs = DB.getRs(stmt, sql);rn try rn if (!rs.next()) rn throw new UserNotFoundException("用户不存在:" + username);rn else rn if (!password.equals(rs.getString("password"))) rn throw new PasswordNotCorrectException("密码不正确哦!");rn rn u = new User();rn u.setId(rs.getInt("id"));rn u.setUsername(rs.getString("username"));rn u.setPassword(rs.getString("password"));rn u.setPhone(rs.getString("phone"));rn u.setAddr(rs.getString("addr"));rn u.setRdate(rs.getTimestamp("rdate"));rn rnrn catch (SQLException e) rn e.printStackTrace();rn finally rn DB.close(rs);rn DB.close(stmt);rn DB.close(conn);rn rn rn return u;rn rnrn
String Method ????
index of rn lengthrn substringrnchatAtrnzhe xie dou shi String Method qing bang wo jieshiyixia !
eclipse连hadoop集群运行wordcount报空指针
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).rnlog4j:WARN Please initialize the log4j system properly.rnlog4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.rnException in thread "main" java.lang.NullPointerExceptionrn at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)rn at org.apache.hadoop.util.Shell.runCommand(Shell.java:404)rn at org.apache.hadoop.util.Shell.run(Shell.java:379)rn at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:589)rn at org.apache.hadoop.util.Shell.execCommand(Shell.java:678)rn at org.apache.hadoop.util.Shell.execCommand(Shell.java:661)rn at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:639)rn at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:435)rn at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:277)rn at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:125)rn at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:344)rn at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)rn at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAs(Subject.java:396)rn at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)rn at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)rn at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)rn at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAs(Subject.java:396)rn at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)rn at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)rn at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)rn at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)rn at test.WordCount.run(WordCount.java:150)rn at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)rn at test.WordCount.main(WordCount.java:155)rnrnhadoop运行正常,且wordCount的jar在hadoop上执行是成功的,但是用eclipse上运行就报空指针,运行参数是:rninput outputrnDFS也可以正常的连接上传、下载rnrnrn
批量运行状态查询报空指针异常解决
服务器上发现批量运行状态查询有时会报系统未知错误,然后查询日志发现,batch端返回的rejcode=null,导致mweb无法识别错误类型。 但是为什么rejcode会等于null呢? 跟踪代码发现,batchtemplate里面有一个try catch,在catch里面会给rejcode重新赋值,所以验证try里面的代码 try {             context.setD
eclipse开发hadoop,运行wordcount报空指针错误。
hadoop2.2.0,在eclipse里面运行wordcount程序,参数设置应该没有问题rnhdfs://192.168.1.110:9000/user/hadoop/input hdfs://192.168.1.110:9000/user/hadoop/outputrn但是运行之后报了这个错误:rnrnlog4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).rnlog4j:WARN Please initialize the log4j system properly.rnlog4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.rnException in thread "main" java.lang.NullPointerExceptionrnat java.lang.ProcessBuilder.start(Unknown Source)rnat org.apache.hadoop.util.Shell.runCommand(Shell.java:445)rnat org.apache.hadoop.util.Shell.run(Shell.java:418)rnat org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:650)rnat org.apache.hadoop.util.Shell.execCommand(Shell.java:739)rnat org.apache.hadoop.util.Shell.execCommand(Shell.java:722)rnat org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:633)rnat org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:421)rnat org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)rnat org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:125)rnat org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:348)rnat org.apache.hadoop.mapreduce.Job$10.run(Job.java:1285)rnat org.apache.hadoop.mapreduce.Job$10.run(Job.java:1282)rnat java.security.AccessController.doPrivileged(Native Method)rnat javax.security.auth.Subject.doAs(Unknown Source)rnat org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1556)rnat org.apache.hadoop.mapreduce.Job.submit(Job.java:1282)rnat org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)rnat com.test.WordCount.main(WordCount.java:68)rn程序应该没有问题,直接copy的,望大神指教。
部署在tomcat下运行,报空指针错误
action/listrn2017-8-5 10:49:31 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [actionServlet] in context with path [/dhcc] threw exception [Servlet execution threw an exception] with root causernjava.lang.NoClassDefFoundError: Could not initialize class Util.DBUtilrn at DAO.StudentDAO.findAll(StudentDAO.java:95)rn at web.ActionServlet.service(ActionServlet.java:41)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:662)rn
TypeError: Cannot call method 'getValue' of undefined
使用miniui时报错rn[img=https://img-bbs.csdn.net/upload/201401/07/1389085534_462702.jpg][/img]rn求教怎么改
项目已部署就报空指针
java.lang.RuntimeException: Unable to instantiate application android.app.Application: rnrnjava.lang.NullPointerExceptionrn at android.app.LoadedApk.makeApplication(LoadedApk.java:504)rn at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4364)rn at android.app.ActivityThread.access$1300(ActivityThread.java:141)rn at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)rn at android.os.Handler.dispatchMessage(Handler.java:99)rn at android.os.Looper.loop(Looper.java:137)rn at android.app.ActivityThread.main(ActivityThread.java:5039)rn at java.lang.reflect.Method.invokeNative(Native Method)rn at java.lang.reflect.Method.invoke(Method.java:511)rn at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)rn at dalvik.system.NativeStart.main(Native Method)rnCaused by: java.lang.NullPointerExceptionrn at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:379)rn at android.app.LoadedApk.getClassLoader(LoadedApk.java:322)rn at android.app.LoadedApk.makeApplication(LoadedApk.java:496
tomcat访问刚做好的Jsp页面时报错:Type mismatch: cannot convert from String to String[]
我是一个初学者,这是看网上视频时做的:[img=https://img-bbs.csdn.net/upload/201710/12/1507816386_660960.png][/img]rn[img=https://img-bbs.csdn.net/upload/201710/12/1507816499_33489.png][/img]rn我是照着视频上用Eclipse敲的,视频是用MyEclipse敲的,结果点击reg页面的提交按钮时访问的时候就是这样的了:rn[img=https://img-bbs.csdn.net/upload/201710/12/1507816713_218721.png][/img]rn我开始还以为是import java的包,后加一条<%@ page import="java.text.*" %>还是不行。rn跪求大神帮助![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/42.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/42.gif][/img]
异常javax.servlet.ServletException: org.jdom.Element: method getValue()Ljava/lang
这个问题 有遇到的怎么解决的 给指点一下rn另外在本地Tomcat上运行没有问题 ,发布到服务器Websphere上之后就出现这个问题rnjdom是最新的rn[11-7-5 14:02:49:216 CST] 1d0a4cd7 SystemOut O javax.servlet.ServletException: org.jdom.Element: method getValue()Ljava/lang/String; not foundrn[11-7-5 14:02:49:216 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))rn[11-7-5 14:02:49:216 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.itown.util.ajax.AAFilter.doFilter(AAFilter.java:30)rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.itown.util.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:37)rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))rn[11-7-5 14:02:49:217 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))rn[11-7-5 14:02:49:218 CST] 1d0a4cd7 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
The method **() is undefined for the type
在类中定义了该方法 rn类型正确rn在jsp页面上引用 为什么提示这样的错误rn请指点!
jsp页面提示cannot be resolved to a type
rn大家好,我有一个jsp页面放在根目录就可以运行,可是放在子目录就不能运行了,请问这是为什么呀,只有提示以下信息,让我不知所措,请大家帮帮忙,谢谢了rnrnAn error occurred at line: 14 in the jsp file: /newjsp.jsprnRegister cannot be resolved to a typern
关于引用返回 Type &GetValue()中的局部变量
对于这样的函数,是否正确rnType &GetValue()rnrn Type type;rn return type;rnrnrn这样的函数呢?rnType &GetValue()rn rn static Type type;rn return type;rnrnrn如果GetValue 是类A的成员函数rnType & A::GetValue()rnrn return member; //member: Type A::member;rnrn可以吗?rn那位大虾给我讲解一下引用返回的有关知识
奇怪的JSP页面空指针错误
我原来的一个WEB项目现在重新运行居然报空指针错误,不管什么JSP页面都无法运行。(struts2+spring+hibenate) 于是新建一个空的JSP页面0k.jsp 运行时也出现空指针错误,错误如下:rn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at org.apache.jsp.ok_jsp._jspInit(ok_jsp.java:22)rn at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:248)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:72)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn2009-3-5 10:48:30 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at org.apache.jsp.common.uncaughtException_jsp._jspInit(uncaughtException_jsp.java:22)rn at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)rn at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)rn at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn2009-3-5 10:48:30 org.apache.catalina.core.StandardHostValve customrn严重: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/common/uncaughtException.jsp]rnorg.apache.jasper.JasperException: java.lang.NullPointerExceptionrn at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)rn at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)rn at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.NullPointerExceptionrn at org.apache.jsp.common.uncaughtException_jsp._jspInit(uncaughtException_jsp.java:22)rn at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rn ... 19 morern各位大侠,这是为什么啊!在线等待。。。。
jsp页面空指针异常错误
我的网站 制作完成前都很正常,但是我挂到服务器上后,一开始还正常,用着用着就出现空指针异常的错误rn重启下tomcat 就又好使了 为什么呢rn[code=java]java.lang.NullPointerExceptionrnorg.apache.jsp.aa_jsp._jspInit(aa_jsp.java:22)rnorg.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)rnorg.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)rnorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)rnorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rnorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)[/code]rnrn我在网上找的相关的资料rn项目lib目录下包含的 jsp-api.jar、servlet-api.jar 与 tomcat/lib 目录下的 jsp-api.jar、servlet-api.jar 重复。rn但是我的项目lib目录下没有这两个文件呀rnrn大神 谢谢 帮出出主意
相关热词 c# 线程顺序 c#昨天当前时间 c# 多进程 锁 c#mysql图片存取 c# ocx 委托事件 c# 读取类的属性和值 c# out 使用限制 c#获取url的id c#怎么进行分页查询 c# update 集合