Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Éè¼ÆÄ£Ê½Ö®:IteratorÁ´±íģʽ

ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔ­Àí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËØºÍ¸ÃÔªËØµÄ½Úµã¡£
public class NodeBean implements Serializable
{
   
    private Object data; //ÔªËØ±¾Éí
    private NodeBean next; //ÏÂÒ»¸ö½Úµã
   
  &n ......

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³ÌÐòÖÐString args[]Æðʲô×÷Óã¿

ÔÚÏÂÃæÕâ¸ö³ÌÐòÖÐString args[]Æðʲô×÷Óã¿ÎÒѧ¹ýC++£¬String args[]ÓëC++ÖеÄʲôÀàËÆ£¿Èç¹ûÊÇC++£¬ÏëÒªÊä³ö×Ö·û´®Ö»ÒªÔÚÏÂÃæÐ´cout<<"...."<<endl;¾Í¿ÉÒÔÁË,void main()ÖеÄÀ¨ºÅΪ¿Õ£¬¶øjavaÖÐΪʲôҪдString args[]ÄØ£¿
class Example{
public static void main(String args[]){
System.out.printl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ