jspsmartupload中的getWriter()问题,请高手指教
我的代码如下:
<%@ page contentType= "text/html;charset=gb2312 " import= "com.jspsmart.upload.* " %> <%@ include file= "inc/config.jsp "%> <%
int sid=Integer.parseInt(request.getParameter( "sid "));
String sql= "select * from db_scrap where sid= "+sid;
ResultSet rs=cp.dcs.db.getQuery(sql);
try
{
SmartUpload su = new SmartUpload();
su.initialize(pageContext);
su.setContentDisposition(null);
String filename=utilDBCommon.toRSValueString(rs, "slave ");
filename=(String)filename.substring(0,filename.length()-1);
String file= "/upload/ "+filename;
out.println(file);
su.downloadFile(file);
}
catch(Exception e)
{
e.printStackTrace();
}
%>
如果我把String file= "/upload/ "+filename;换成一个常量就可以正确下载,但是这样的话,可以下载,但是下载的文件为空,求高手指点一下啊!!!
------解决方案--------------------我都快哭了,哪个大虾给我看看,求求你们爱怜~~