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

JSPÓï·¨µÄxml±í´ï

´ó¼Ò×ÜÊDz»Ï²»¶¿´µ½<%ºÍ%>ÔÚjspÒ³ÃæÉÏ£¬ÆäʵÎÒÃÇ¿ÉÒÔʹÓñȽÏÓÅÑŵÄxml·½Ê½À´±í´ï
1£¬Òþº¬µÄ×¢ÊÍ
JSPÓï·¨£º<%-- ÄÚÈÝ --%>
XMLÓï·¨£ºÎÞ
2£¬±äÁ¿»òº¯ÊýµÄÉùÃ÷
JSPÓï·¨:<%! declaration;[declaration;]+... %>
ÀýÈ磺
<%!
   int i=0;int a,b,c;
   Color red=new Color(255,0,0);
   private static final String OK="ok";
   public String getAnswer(){
       return OK;
   }
%>
XMLÓï·¨£º
<jsp:declaration>
    declartion;[declaration;]+...
</jsp:declaration>
ÀýÈ磺
<jsp:declaration>
   int i=0;int a,b,c;
   Color red=new Color(255,0,0);
   private static final String OK="ok";
   public String getAnswer(){
       return OK;
   }
</jsp:declaration>
3£¬±í´ïʽ
JSPÓï·¨£º<%=expression%>
ÀýÈ磺
<%=Math.round(Math.random*100)%>
XMLÓï·¨£º
<jsp:expression>
   expression
</jsp:expression>
ÀýÈ磺
<jsp:expression>
   Math.round(Math.random*100)
</jsp:expression>
4£¬´úÂëÆ¬¶Ï
JSPÓï·¨£º<% your java code %>
ÀýÈ磺
<%
   String username=request.getParameter("username").trim();
   String password=request.getParameter("password").trim();
%>
XMlÓï·¨£º
<jsp:scriptlet>
   your java code
</jsp:scriptlet>
ÀýÈ磺
<jsp:scriptlet>
   String username=request.getParameter("username").trim();
   String password=request.getParameter("password").trim();
</jsp:scriptlet>
5£¬Ö¸Áinclude
JSPÓï·¨£º<%@include file="relativeURL"%>
ÀýÈ磺<%@include file="static_head.html"%>
XMLÓï·¨£º<jsp:directive.include file="relativeURL"/>
ÀýÈ磺<jsp:directive.include file="static_head.html"/>
6£¬Ö¸Ápage
JSPÓï·¨£º<%@page attribtes%>
ÀýÈ磺<%@page import="java.util.HashMap"%>
XMLÓï·¨£


Ïà¹ØÎĵµ£º

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(JAVA)α¾²Ì¬µÄ¾ßÌåÉèÖùý³Ì

ǰ¼¸Ì죬ºþÄÏSEOÔÚÓÃjspдһ¸öÆóÒµÕ¾³ÌÐòµÄʱºò£¬ÒòΪҪ²Î¼ÓÏîÄ¿´ð±ç¾ºÑ¡£¬ËùÒÔ¾ÍÏëΪ×Ô¼ºÐ´µÄ³ÌÐò¸ã¼¸¸öÁÁµã£¬ÒòΪ¸ãSEO¾ÃÁË£¬²»×Ô¾õ¾Í»áÏ뵽α¾²Ì¬£¬µ«ÊÇÔڰٶȲéÁËÒ»¸öÏÂÎ磬ֻ²éµ½ÁËurlrewrite¼Ü°üµÄÏÂÔØµØ·½£¬ºÍ¼ÜÉè·½ÃæµÄÎÄÕ£¬²¢Ã»ÓÐjsp(JAVA)α¾²Ì¬µÄ¾ßÌå²Ù×÷ʾ·¶£¬ÓеÄÒ²Ö»ÊÇ£¬µ¥Ò³ÃæµÄα¾²Ì¬µÄд·¨£¬ÕâÀïÎÒ¾ÍÖØÍ· ......

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" />
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ