´ëÃæÀÌ·¸½À´Ï´Ù.


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :³²Áظð 1998³â 12¿ù 18ÀÏ 15:00:37

In Reply to: ³²Áظð´Ô º¸¼¼¿ä. posted by Á¤Çý¿ø on 1998³â 12¿ù 18ÀÏ 11:06:52:

Á¦°¡ ÇÑ ¼Ò½º¸¦ º¸³»µå¸³´Ï´Ù.
Ŭ¶óÀ̾ðÆ®ÀÇ È­ÀÏ ¿äû (¸µÅ© Ŭ¸¯,¹öưŬ¸¯)À»
¼­ºí¸´ÀÌ ¹Þ¾Æ¼­ È­ÀÏÀÇ ³»¿ëÀÇ ÀÀ´äÇÏ´Â ¼Ò½º


public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
try
{
String filename="junmo.txt";
String filepath="c:\\";
byte b[]=new byte[1024];
File file=new File(filepath,filename);
FileInputStream fin=new FileInputStream(file );


res.setContentType("application/smnet");
res.setHeader("Content-
Disposition","attachment;
filename="+filename+";");

ServletOutputStream
out=res.getOutputStream();

int numRead = fin.read(b);
while (numRead != -1) {
out.write(b, 0, numRead);
numRead = fin.read(b);
}

out.close();
} catch(Exception e)
{ new PrintStream(res.getOutputStream()).println(e.toString());
}




´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]