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
Ïà¹ØÎĵµ£º
O/R Mapping ÊÇ Object Relational Mapping£¨¶ÔÏó¹ØÏµÓ³É䣩µÄËõд¡£Í¨Ë׵㽲£¬¾ÍÊǽ«¶ÔÏóÓë¹ØÏµÊý¾Ý¿â°ó¶¨£¬ÓöÔÏóÀ´±íʾ¹ØÏµÊý¾Ý¡£ÔÚO/R MappingµÄÊÀ½çÀÓÐÁ½¸ö»ù±¾µÄÒ²ÊÇÖØÒªµÄ¶«¶«ÐèÒªÁ˽⣬¼´VO£¬PO¡£
¡¡¡¡VO£¬Öµ¶ÔÏó(Value Object)£¬PO£¬³Ö¾Ã¶ÔÏó(Persisent Object)£¬ËüÃÇÊÇÓÉÒ»×éÊôÐÔºÍÊôÐÔµÄgetºÍset·½·¨×é³É¡£´ ......
Ê×ÏÈ´ÓÒ»µÀÃæÊÔÌâĿ̸Æð:
package pkg1;
public class Jupiter
{
void method1(){
System.out.println("In Jupiter");
}
public void call(){
method1();
}
}
package pkg2;
import pkg1.Jupiter;
public class Minerva extends Jupiter{
public void method1(){
......
ÔÚÏÂÃæÕâ¸ö³ÌÐòÖÐ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 ......
Eclipse ³£Óòå¼þµÄ°²×°
1£©Download plugin package
2) Exit Eclipse App
3) Unzip the plugin and copy it to ..\Eclipse\plugins
4) Restart Eclipse App
J2EE µÄ¿ªÔ´Æ½Ì¨
Eclipse+Tomcat+Lombez+MyEclipse
MyEclipse: MyEclipseEnterpriseWorkbeachInstall , °²×°µ½Ä¿Â¼Eclipse ϲſÉÒÔÕý³£Ê¹Óá£
Servlet ......
ÓÃJavaдµÄ¼ÆËãÆ÷
package com.wenbo.myprogrem.day15;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.Actio ......