Eclipse JSP ±êÇ©×Ô¶¯Ìáʾ
ÎÒÃÇÔÚдһ¸öjspÒ³Ã棬ҪʹÓÃstruts2±êÇ©£¬ÎÒÃÇÒªÊ×ÏÈÒªÔÚjspÒ³ÃæÍ·²¿·Å£º<%@ taglib prefix="s" uri="/struts-tags" %>£¬µ±È»Òª·Åstruts2µÄjar°üÁË¡£ÎÒÃÇ¿ÉÒÔË¢ÐÂһϴËÒ³Ã棬±ÈÈç°ÑÕâ¸öÒ³Ãæ±£´æºóÔÙ´ò¿ª£¬Ä¿µÄÊÇÔÚдstruts2±êǩʱ£¬ÓÐstruts2±êÇ©×Ô¶¯Ìáʾ¹¦ÄÜ¡£
Ïà¹ØÎĵµ£º
JSPÒ³ÃæÖÐÒ»°ãÓÐÁ½Àà×¢ÊÍ
1.html×¢ÊÍ
ÐÎÈç<!--...................-->
Ëü»áͬhtml±ê¼Çһͬ·¢µ½¿Í»§¶Ë
2.jsp×¢ÊÍ£¨3ÖÖ£©
ÐÎÈç<%--.............................--%>
Ëü²»»á±»·¢Ë͵½¿Í»§¶Ë£¬Ö»ÓÃÀ´×¢ÊÍ·þÎñÆ÷¶ËµÄjspÎļþ£¬Á¬jspÉú³ÉµÄservletҲûÓÐ×¢ÊͽøÈ¥£¬ÕâÒ²ÊǴ󲿷ÖÈËʹÓõÄ×¢ÊÍ
ÐÎÈç<%//...... ......
ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=" "%>
<jsp:include page=" " flush="true"/>
Ç°ÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐΪԪËØ.
ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö(ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸)¶¼ÏàͬµÄʱºò,Î ......
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.Servl ......
½«Ò»¸öJSPÒ³ÃæÖеÄ<%@ page contentType="text/html; charset=GBK" language="java" %>Ì滻Ϊ
<%@ page contentType="application/vnd.ms-Excel;charset=GBK" language="java"%> //Excel
»ò
<%@ page contentType="application/vnd.ms-word;charset=GBK" language="java"%> //Word
ÔÚÒ³Ã濪ʼÊä³öÊý¾ ......
´ÓÍøÉϲéÕÒ×ÊÁÏjava/jsp»ñµÃ¿Í»§¶Ë(IE)Íø¿¨MACµØÖ·µÄ·½·¨´ó¸ÅÓÐÈýÖÖ¡£
1¡¢Í¨¹ýÃüÁʽ£¬ÔÚ¿Í»§¶ËÖ´ÐÐIpconfig µÈµÈ
2¡¢Í¨¹ýActiveXµÄ·½·¨
3¡¢Í¨¹ýÏò137µÄ¶Ë¿Ú·¢ËͲéѯָÁîµÄ·½·¨
¼ò½é£º
µÚÒ»ÖÖ·½·¨,ÔÚÕæÕýÓõ½Ê±ºò²»ÖªµÀΪʲô»ñµÃmacµØÖ·µÄÖ¸Áî×èÈûÁË,²»ÍùϼÌÐøÖ´ÐС£¶øÇÒËÙ¶ÈÊÇÕâÈýÖÖ·½·¨ÖÐ×îÂýµÄÒ»ÖÖ¡£
´úÂëÈçÏ ......