-1
String urlPath = "http://hostname:portno/filepath.pdf";
url = new URL(urlPath);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestProperty("Content-Type", "application/octet-stream");
OutputStream outStream = conn.getOutputStream();
out = new BufferedOutputStream(outStream);
if (byteContent != null && byteContent.length > 0) {
out.write(byteContent);
byteLength = byteContent.length;
}
這個代碼不給任何異常,但不是在我的tomcat位置如何使用jsf在http服務器中保存文件?
這是什麼都與JSF呢? – skaffman 2011-03-11 14:20:43