2011年12月26日星期一

第20天第2节: JSP基础语法(下)

==include: <jsp:include page=...
1. @include : static include, just adding original file in
    <%@include file="content.html"%>

2. jsp:include: dyanmic include, include the file after parsing jsp code. can use parameters. this is a tag
    <jsp:include page="content.html/>

    <jsp:include page="content.jsp>
         <jsp.param name="paraname" value="paravalue"/>
    </jsp:include>

==forwared: <jsp:forward page=...
   <jsp:forward page="content.html">

    <jsp:forward page="content.jsp>
         <jsp.param name="paraname" value="paravalue"/>

    </jsp:forward>

没有评论: