问题是java.io.EOFException
当我尝试做时它会在服务器端启动ois = new ObjectInputStream(request.getInputStream());
private void writeObjectStream(HttpServletRequest request,
HttpServletResponse response) {
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(response.getOutputStream());
oos.writeChars("x");
} catch (IOException e) {
e.printStackTrace();
} finally {
IOUtil.closeQuietly(oos, ois);
}
}
writeObjectStream 的调用:
....
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
response.setHeader("Location", "www.sample.com");
response.setHeader("Content-Length", "" + 500);
writeObjectStream(request, response);
return true;