出现 IllegalStateException 可能的原因是你的页面已经转到其它地方去了。
解决方案 »
- 各位大虾,请求你们的帮忙,不胜感激!
- 请看看正则表达式,谢谢!
- jvm 垃圾收集
- 关于Html嵌入打成jar包的Applet方法
- 容器和组件的间距问题
- java 写的fpt client在windows下可以正常下载,在unix下面为什么不行呢?(可以列出unix下的文件列表但是不能下载)
- ???????可不可以让函数的返回类型是JButton?
- 向applet传参数?
- JAVA中的reference指的是什么意思?
- 使用jspsmartupload上传文件名为中文的文件时的问题?
- 提问兼散专家分:请问DefaultCellEditor类如何使用?
- 为什么类Search中的Search1不能引用类FindLarge中的Find
view_attachment.jsp //是对TRS数据库操作,不过都无所谓
//////////////////////////////////////////////////////
就是最后几行出错
getOutputStream() has already been called 这个错误大侠们应该很清楚吧
//////////////////////////////////////////////////////
<%@ page import="com.eprobiti.trs.*,java.io.*,java.sql.*" contentType="text/html;charset=GBK"%><jsp:useBean id="trscon" scope="session" class="com.eprobiti.trs.TRSConnection"/><%
long lRecNo;
int iColNo = 6;
int iIndex;
String strParam;
strParam = request.getParameter("id");
lRecNo = Long.parseLong(strParam);
// strParam = "1";//request.getParameter("multino");
iIndex = Integer.parseInt(strParam);
com.eprobiti.trs.TRSResultSet trsrs2 ;String strIP = "172.21.10.33";
String strPort = "8888";
String strUser = "system";
String strPass = "manager";
boolean trsIsConnect=false;
try
{
if (trscon.isClosed())
{
trscon = new com.eprobiti.trs.TRSConnection();
trscon.connect(strIP, strPort, strUser, strPass);
session.setAttribute("trscon", trscon);
}
trsIsConnect = true;
}
catch(Exception ex)
{
ex.printStackTrace();
}trsrs2= new com.eprobiti.trs.TRSResultSet();
trsrs2.setConnection(trscon);
String strWhere = "";//"file_id="+request.getParameter("file_id");
if(trsrs2.isClosed())
{
trsrs2.executeSelect("cieccinfo", strWhere, "", "", "", 0, com.eprobiti.trs.TRSConstant.TCE_OFFSET, false);
trsrs2.setReadOptions(com.eprobiti.trs.TRSConstant.TCE_OFFSET,"",";");
}
try
{
trsrs2.moveTo( 0,iIndex );
byte[] photo = trsrs2.getBytes(iColNo, 0 );
javax.servlet.ServletOutputStream outx = response.getOutputStream();
outx.write(photo,0,photo.length);
photo=null;
}
catch(TRSException ex)
{
ex.printStackTrace();
}
%>