jspÖÐincludeµÄÁ½ÖÖÐÎʽ
jspÖÐincludeµÄÁ½ÖÖÐÎʽ: 1.<%@ include file=” ”%>
2.<jsp:include page=” ” flush=”true”/>
¶þÕßÖ÷ÒªÓÐÁ½¸ö·½ÃæµÄ²»Í¬;
£¨1£©:Ö´ÐÐʱ¼äÉÏ:
<%@ include file=”relativeURI”%> ÊÇÔÚ·Òë½×¶ÎÖ´ÐÐ
<jsp:include page=”relativeURI” flush=”true” /> ÔÚÇëÇó´¦Àí½×¶ÎÖ´ÐÐ.
£¨2£©:ÒýÈëÄÚÈݵIJ»Í¬:
<%@ include file=”relativeURI”%> ÒýÈ뾲̬Îı¾(html,jsp),ÔÚJSPÒ³Ã汻ת»¯³Éservlet֮ǰºÍËüÈں͵½Ò»Æð.
<jsp:include page=”relativeURI” flush=”true” /> ÒýÈëÖ´ÐÐÒ³Ãæ»òservletËùÉú³ÉµÄÓ¦´ðÎı¾.
Á½ÖÖÓ÷¨ÖÐfileºÍpageÊôÐÔ¶¼±»½âÊÍΪһ¸öÏà¶ÔµÄURI.Èç¹ûËüÒÔб¸Ü¿ªÍ·,ÄÇôËü¾ÍÊÇÒ»¸ö»·¾³Ïà¹ØµÄ·¾¶.½«¸ù¾Ý¸³¸øÓ¦ÓóÌÐòµÄURIµÄǰ׺½øÐнâÊÍ,Èç¹ûËü²»ÊÇÒÔб¸Ü¿ªÍ·,ÄÇô¾ÍÊÇÒ³ÃæÏà¹ØµÄ·¾¶,¾Í¸ù¾ÝÒýÈëÕâ¸öÎļþµÄÒ³ÃæËùÔڵķ¾¶½øÐнâÊÍ.
ÒÔÏÂÊÇʵ¼ÊÀý×ÓÀ´½âÊÍÒÔÉÏÄÚÈÝ£º
//======date.jspµÄÔ´Îļþ=====//
<%@ page language=”java” contentType="text/html;charset=gb2312"%>
<%
java.util.Date date=new java.util.Date();
String date_cn ="";
String dateStr = "";
switch(date.getDay())
{
&nbs
Ïà¹ØÎĵµ£º
Ò»¡¢´¦ÀíajaxÇëÇóµÄjspÎļþ£ºauto.jsp
<%@ page contentType="text/html; charset=gb2312" %>
<%
//ÉèÖÃÊä³öÐÅÏ¢µÄ¸ñʽ¼°×Ö·û¼¯
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Cache-Control","no-cache&q ......
1 javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
2 »¹ÊÇjavascript£¬½«Ìá½»°´Å¥»òÕßimageÖÃΪdisable
onsubmit="getElById('submitInput').disabled = true; return true;">
3 ÀûÓÃstrutsµÄͬ²½ÁîÅÆ»úÖÆ
......
ÎÒÃǶ¼ÖªµÀÔÚ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 ......