Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA excel

<%    
 response.setContentType("application/vnd.ms-excel;charset=utf-8");
 String  reportname = (String)request.getAttribute("reportname");
 String  reportFileName=java.net.URLEncoder.encode(reportname, "UTF-8");
 String  filenamedisplay =reportFileName+".xls";
 response.addHeader("Content-Disposition","attachment;filename=" + filenamedisplay);//Ôö¼ÓĬÈϱ£´æÎļþÃû 
 String  userid = (String)request.getAttribute("_fm_userid"); 
 int index=0;
%>
<html>
  <head>
    <title><%=reportname%>²é詢Áбí</title>    
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page"> 
  </head>
<%
File file=new File("G:/Eclipse.pdf");//ÎļþÀàÐÍ ¿ÉÒÔΪPDF XLS DOC
FileInputStream in=new FileInputStream(file);
byte [] b=new byte[1024];
response.setContentType("application/pdf;charset=GB2312");//application/pdf  /msxml(excel)  /msword
//response.setHeader("Content-Disposition",   "attachment;   filename=9602.pdf");//ÏÂÔØ
int len;
while((len=in.read(b))>0)   
      response.getOutputStream().write(b,0,len);
%>
///////////////////////////////////////////////////////////////////
ÔÚweb.xmlÖмÓÈë
  <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/msexcel&l


Ïà¹ØÎĵµ£º

JAVAÏß³ÌÖ®¶þ£ºÏ̵߳ĵ÷¶È

      ÓëÏß³ÌÐÝÃßÀàËÆ£¬Ï̵߳ÄÓÅÏȼ¶ÎÞ·¨±£ÕÏÏ̵߳ÄÖ´ÐдÎÐò¡£Ö»²»¹ý£¬ÓÅÏȼ¶¸ßµÄÏ̻߳ñÈ¡CPU×ÊÔ´µÄ¸ÅÂʽϴó£¬ÓÅÏȼ¶µÍµÄ²¢·Çû»ú»áÖ´ÐС£Ï̵߳ÄÓÅÏȼ¶ÓÃ1-10Ö®¼äµÄÕûÊý±íʾ£¬ÊýÖµÔ½´óÓÅÏȼ¶Ô½¸ß£¬Ä¬ÈϵÄÓÅÏȼ¶Îª5¡£ÔÚÒ»¸öÏß³ÌÖпªÆôÁíÍâÒ»¸öÐÂỊ̈߳¬ÔòпªÏ̳߳ÆΪ¸ÃÏ̵߳Ä×ÓỊ̈߳¬×ÓÏ̳߳õʼÓÅÏ ......

javaµÄ(PO,VO,TO,BO,DAO,POJO)½âÊÍ

O/R Mapping ÊÇ Object Relational Mapping£¨¶ÔÏó¹ØϵӳÉ䣩µÄËõд¡£Í¨Ë׵㽲£¬¾ÍÊǽ«¶ÔÏóÓë¹ØϵÊý¾Ý¿â°ó¶¨£¬ÓöÔÏóÀ´±íʾ¹ØϵÊý¾Ý¡£ÔÚO/R MappingµÄÊÀ½çÀÓÐÁ½¸ö»ù±¾µÄÒ²ÊÇÖØÒªµÄ¶«¶«ÐèÒªÁ˽⣬¼´VO£¬PO¡£
¡¡¡¡VO£¬Öµ¶ÔÏó(Value Object)£¬PO£¬³Ö¾Ã¶ÔÏó(Persisent Object)£¬ËüÃÇÊÇÓÉÒ»×éÊôÐÔºÍÊôÐÔµÄgetºÍset·½·¨×é³É¡£´ ......

JAVAÏß³ÌÖ®Áù£ºÏ̵߳ÄÉúÃüÖÜÆÚ¼°ËÀËø

Ò»£¬Ï̵߳ÄËĸöÖ÷ÒªÖÜÆÚ״̬ÊÇ“´´½¨”£¬“¿ÉÖ´ÐД£¬“·Ç¿ÉÖ´ÐД£¬“ÏûÍö”£¬×´Ì¬×ª»»¹ØϵÈçÏÂͼ£º
£¨1£©´´½¨¡£µ±ÊµÀý»¯Ò»¸öthread¶ÔÏó²¢Ö´ÐÐstart()·½·¨ºó£¬Ï߳̽øÈë“¿ÉÖ´ÐД״̬¿ªÊ¼Ö´ÐС£ËäÈ»¶àÏ̸߳øÓû§Ò»ÖÖͬʱִÐеļÙÏ󣬵«ÊÂʵÉÏÔÚͬһʱ¼äµãÄÚ£¬Ö»ÓÐÒ»¸ö ......

ʲôÊÇjava¶ÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓÃ

±¾ÎĽéÉܶÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓõĸÅÄî¡¢Ó¦Óü°ÆäÔÚUMLÖеıíʾ¡£
1£®¶ÔÏóµÄÇ¿¡¢Èí¡¢ÈõºÍÐéÒýÓÃ
   ÔÚJDK 1.2ÒÔÇ°µÄ°æ±¾ÖУ¬ÈôÒ»¸ö¶ÔÏó²»±»ÈκαäÁ¿ÒýÓã¬ÄÇô³ÌÐò¾ÍÎÞ·¨ÔÙʹÓÃÕâ¸ö¶ÔÏó¡£Ò²¾ÍÊÇ˵£¬Ö»ÓжÔÏó´¦ÓÚ¿É´¥¼°£¨reachable£©×´Ì¬£¬³ÌÐò²ÅÄÜʹÓÃËü¡£´ÓJDK 1.2°æ±¾¿ªÊ¼£¬°Ñ¶ÔÏóµÄÒýÓ÷ÖΪ4ÖÖ¼¶±ð£¬´Ó¶øÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ