티스토리 뷰

카테고리 없음

uploadResult.jsp

🩷 슈 🧡 2010. 6. 24. 20:42
728x90
SMALL
<%@ page language="java" contentType="text/html; charset=EUC-KR"    pageEncoding="EUC-KR"
  import="java.io.*, java.util.*"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
 <%
 //request에 저장된 모든 속성들을 가져와서 보여주자.
 Enumeration en = request.getAttributeNames();
 while(en.hasMoreElements()) {
 
  //문자열로 캐스팅
  String name = (String)en.nextElement();
 
  //이 이름으로 속성값을 꺼낸다.
  Object obj = request.getAttribute(name);
  if(obj instanceof File) { //너 파일이니?
   //파일 객체니까
   File f = (File)obj;
   out.println("파일 크기 : " + f.length() + "bytes<br/>");
  } else {
   //나머지는 다 문자열들이니까.
   String value = (String)obj;
   out.println(name + " : " + value + "<br/>");
  }
 }
 %>
</body>
</html>
728x90
LIST
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/10   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함
250x250