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
Ïà¹ØÎĵµ£º
תÌûhttp://zmfkplj.javaeye.com/blog/629678
ÔÚ³õѧjava swingʱ±ãÓõÄÊÇJbuilder£¬±ã½ÝµÄ¹¤¾ßϲúÉúµÄ½á¹ûÓÐÁ½¸ö£¬Ò»ºÃÒ»»µ¡£ºÃµÄ·½ÃæÊÇ̫ˬÁË£¬½ö½öÊó±êµã»÷£¬Êó±êÒƶ¯£¬±ã»á²ú³ö²»ÓÃÀí½âµÄ´úÂ룬¶øÕâЩ´úÂëÕÕÑùÄÜÔËÐУ¬Íê³ÉËùÐèÒªµÄ¹¦ÄÜ£»»µµÄ·½ÃæÊÇÌ«ÔãÁË£¬µ±À뿪Jbuilder¹¤¾ß¿ª·¢swingʱ£¬ËùÓеķ½ÃæͨͨûÓУ¬ËùÓе ......
Ê×ÏÈ´ÓÒ»µÀÃæÊÔÌâĿ̸Æð:
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(){
......
»ùÓÚ±íµ¥µÄÎļþÉÏ´«
Èç¹ûÔÚ±íµ¥ÖÐʹÓÃ±íµ¥ÔªËØ <input type=“file”
/>£¬ä¯ÀÀÆ÷ÔÚ½âÎö±íµ¥Ê±£¬»á×Ô¶¯Éú³ÉÒ»¸öÊäÈë¿òºÍÒ»¸ö°´Å¥£¬ÊäÈë¿ò¿É¹©Óû§Ìîд±¾µØÎļþµÄÎļþÃûºÍ·¾¶Ãû£¬°´Å¥¿ÉÒÔÈÃä¯ÀÀÆ÷´ò¿ªÒ»¸öÎļþÑ¡Ôñ¿ò¹©
Óû§Ñ¡ÔñÎļþ£º
µ±±íµ¥ÐèÒªÉÏ´«Îļþʱ£¬ÐèÖ¸¶¨±íµ¥ enctype µÄֵΪ multipart/fo ......
ÔÚÏÂÃæÕâ¸ö³ÌÐòÖÐ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 ......