Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSPÖж¯Ì¬INCLUDEÓ뾲̬INCLUDEµÄÇø±ð

JSPÖÐÓÐÁ½ÖÖ°üº¬Óï¾ä£º
1. <%@include file="head.jsp" %>
2. <jsp:include page="head.jsp" />
   »òÕߣº
  <jsp:include page="jieshou.jsp">
   <jsp:param name="canshu" value="magci" />
   </jsp:include>
Á½ÖÖ°üº¬µÄÇø±ð£º
1.<%@include file="uri" %>:ÏȰüº¬ºó´¦Àí
   a.²»¹Ü±»°üº¬ÎļþÊǾ²Ì¬»¹ÊǶ¯Ì¬£¬Ö±½Ó½«Ò³ÃæÖеÄÈ«²¿ÄÚÈݰüº¬½øÀ´£»
   b.Ö´ÐÐʱÏȽ«°üº¬½øÀ´µÄÄÚÈÝÒ»Æð´¦ÀíÍêÖ®ºóÔÙ½«ËùÓеÄÄÚÈÝ·¢¸ø¿Í»§¶Ë¡£
2.<jsp:include page="uri" />:ÏÈ´¦Àíºó°üº¬
   a.ÄÜ×Ô¶¯Çø·Ö±»°üº¬ÎļþÊǾ²Ì¬»¹ÊǶ¯Ì¬£»
   b.Èç¹û±»°üº¬ÎļþÊǾ²Ì¬Îļþ£¬´¦Àí·½Ê½¸úµÚ1ÖÖ·½Ê½Ò»Ñù£¬
     Èç¹ûÊǶ¯Ì¬Îļþ£¬Ôò¸÷×Ô´¦ÀíÍêÖ®ºó°Ñ½á¹û°üº¬½øÀ´·¢¸ø¿Í»§¶Ë¡£
ʵÀý£º
±»°üº¬Ò³Ã棨inc.jsp£©£º
<%
    int i=2; 
%>
<h1>inc.jsp:<%=i%></h1>
ʹÓÃ<%@include file="uri" %>°üº¬£º
<html>
  <head>
    <title>include1</title>
  </head>
  <body>
     <%
         int i=1; 
     %>
     <%@include file="inc.jsp" %>
     <h1>JSP:<%=i %></h1>
  </body>
</html>
ʹÓÃ<jsp:include page="uri" />°üº¬£º
<html>
  <head>
    <title>include2</title>
  </head>
  <body>
     <%
         int i=1; 
     %>
     <jsp:include page="inc.jsp" />
    &nb


Ïà¹ØÎĵµ£º

·Â°Ù¶ÈajaxËÑË÷Ìáʾ£¨jsp£©

<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>index</title>
<meta http-equiv="pragma" content="no-cache"&g ......

JSPÎļþ

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......

JSP¼Ü¹¹¡¢JSP¿ª·¢¹¤¾ßÓÅȱµã±È½Ï

   Ëæ×ż¼ÊõµÄÈÕÐÂÔÂÒì £¬JSPµÄм¼ÊõÒ²²ã³ö²»ÇΪÁË·½Ãæ´ó¼ÒµÄѧϰÓ빤×÷£¬ÏÂÃæ½«¼òµ¥µÄ½éÉÜÒ»ÏÂJSP¼Ü¹¹¡¢JSP¿ª·¢¹¤¾ß¡¢Web·þÎñÆ÷¼°Æäîñȱµã¡£
    JSP¼Ü¹¹£º
    struts£º  Struts¸úTomcat¡¢TurbineµÈÖî¶àApacheÏîĿһÑù£¬ÊÇ¿ªÔ´Èí¼þ£¬ÕâÊÇËüµÄÒ»´óÓŵ㣬ʹ¿ª·¢ÕßÄܸüÉ ......

Ext+json+jsp¹¹½¨µÄ¶¯Ì¬Ê÷

Ê÷½Úµã×éºÏÄ£ÐÍ
package cn.com.jsnh.model.catalog;
public class TreeModel {
private String node;
private CatalogModel model;
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public CatalogModel getModel() {
return model;
}
public void setMo ......

²»ÄܱàÒëjspÔõô°ì

Ò²ÐíºÜ¶à¸ßÊÖ¶¼²»Ï÷½â¾öÕâ¸öÎÊÌ⣬µ«ÊÇÎÒ¾õµÃ¶Ô³õѧÕßÀ´ËµÕâ¸öÎÊÌ⻹ÊÇÒªÑо¿Ò»»áµÄ£¬ËùÒԾͼǼÏÂÀ´ÁË¡£
ÎÊÌâÃèÊö£º
µ±ÄãÔÚEclipseµÄ³ÌÐòÖмÓÈëÒ»¸öJSPÎļþºó£¬Õû¸öProject »á±¨Ò»¸öÕâÑùµÄError.
ÎÊÌâÔ­Òò£º
ĬÈÏEclipseµÄ±àÒë»·¾³ÊÇJRE£¬¶øJREÊDz»´ø±àÒëÆ÷µÄ£¬Ö»ÓÐJDK²Å´ø±àÒëÆ÷¡£ËùÒÔ±ØÐë°ÑJDK×÷ΪÄãÏîÄ¿µÄInstalle ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ