String picname = upload.addImage(request, "pic", "headImage");
if(picname != null){
String path = session.getServletContext().getRealPath("/" )+"pic\headImage\"+user.getHeadpic();
upload.deletepic(path);
user.setHeadpic(picname);
loginqianmapper.updateByPrimaryKeySelective(user);
}
Response.Write("window.parent.uploadSuccess("+picname +");");
The method Write(String) is undefined for the type Response,出这个异常
改成
response.getWriter().write(...);试试
response.write是啥,,,没见过,,
response.getWriter() 返回可将字符文本发送到客户端的 PrintWriter 对象,通过此方法得到的PrintWriter对象默认的编码格式为ISO-8859-1,如需要
转换输出的编码格式可以用getCharacterEncoding()转换为自己需要的编码格式,之后输出就可以用PrintWriter的相应方法了
你看看你的response 是不是httpservletresponse类,我看十有八九是这个原因