求助jsp导出Excel问题

假装我是一个橙子 2017-04-22 04:36:18
在jsp导出Excel时报错:
message An exception occurred processing JSP page /common/easyQueryVer3/ExportToExcel.jsp at line 25
description The server encountered an internal error that prevented it from fulfilling this request.
exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /common/easyQueryVer3/ExportToExcel.jsp at line 25
22: VData tConditionValue = (VData)session.getValue("RESULT_CONDITION_VALUE");
23:
24: int cols = 0;
25: String[][] result = PubFun.getDecodeEasyQueryResult(xresult);
26:
27: if(result!=null && result.length>0){
28: cols = result[0].length;


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:34)


root cause

java.lang.NullPointerException
com.sinosoft.lis.pubfun.PubFun.getDecodeEasyQueryResult(PubFun.java:1711)
org.apache.jsp.common.easyQueryVer3.ExportToExcel_jsp._jspService(ExportToExcel_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:34)


note The full stack trace of the root cause is available in the Apache Tomcat/7.0.41 logs.

已经找到是空指针问题,但是为什么会空指针呢,页面alert有数据啊,就是传到导出的jsp中没有值:
下面是我的代码:
// 导出execl
function exportExcel() {
if (GroupGrid.mulLineCount < 1) {
alert("暂无数据,无法导出");
return false;
}
var sql = document.getElementById("sql").value;
var temp = easyQueryVer3(sql.toString(), 1, 0, 1, 1);
var result = temp.replace(/\^/g, "@@@").replace(/\|/g, "---");
document.getElementById("result").value = result;
info.resultHead = "序号,部门,成本中心,成本中心编号,第一审批人,第一审批人编号,第二审批人,第二审批人编号,公司规划部采购,副总经理VP,财务总监CFO,总经理President";
info.resultConditionName = "员工编号,员工姓名,部门";
info.resultConditionValue = ",,";
info.resultTitle = "财务审批配置";
var date = new Date();
info.resultDate = date.getYear() + "-" + (date.getMonth() * 1 + 1) + "-" + date.getDate();
document.fm.action = "../common/easyQueryVer3/QueryToExport.jsp?resultHead="
+ info.resultHead
+ "&resultConditionName="
+ info.resultConditionName
+ "&resultConditionValue="
+ info.resultConditionValue
+ "&resultTitle="
+ info.resultTitle
+ "&resultDate=" + info.resultDate;
fm.submit();
}
在QueryToExport这个页面中:<%@page contentType="text/html;charset=gb2312" %>
<%@page import="com.sinosoft.utility.VData"%>
<%
try{
String tResult = request.getParameter("result");
String tResultHead = request.getParameter("resultHead");
String tResultConditionName = request.getParameter("resultConditionName");
String tResultConditionValue = request.getParameter("resultConditionValue");
String tResultTitle = request.getParameter("resultTitle");
String tResultDate = request.getParameter("resultDate");

这里的tResult 总是空值,我这个在jsp页面上已经把隐藏了result,导出的Excel也已经给赋值过了为什么就是没有导出呢?
...全文
142 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
内容概要:本文系统介绍了基于MATLAB平台的风力涡轮机雷达信号仿真研究,涵盖完整的仿真代码、实测数据及配套学术文章,重点实现雷达信号处理、风力涡轮机回波建模、微动特征提取与时频分析等核心技术。通过高精度模拟风机叶片旋转引起的调制效应与雷达散射截面变化,深入揭示风力发电场对周边雷达系统造成的电磁干扰机制,为雷达杂波抑制、目标检测优化及空域兼容性设计提供理论支撑与技术验证平台。资源内容还可拓展应用于无人机路径规划、电动汽车调度、电力系统优化等交叉领域,展现MATLAB在复杂系统仿真中的强大集成能力。; 适合人群:具备MATLAB编程基础与雷达信号处理知识的科研人员,适用于从事新能源并网影响评估、雷达系统设计、电磁兼容分析、智能电网或远程 sensing 领域研究的研究生、工程师及高校教师; 使用场景及目标:①开展风电场对空中监视雷达干扰效应的仿真评估;②研究风电杂波的时频特性与微多普勒特征建模方法;③开发针对非合作目标干扰的雷达抗干扰算法与信号分离技术;④作为科研项目申报、论文复现或工程预研的技术原型工具包; 阅读建议:建议结合百度网盘提供的完整资料包(含代码、数据集与参考文献)同步学习,优先运行示例脚本以掌握仿真流程,再根据具体研究需求调整系统参数进行扩展实验,同时可借鉴文中提到的其他MATLAB仿真案例以提升研究深度与广度。

51,409

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧