用jsp:include指令动态加载文件
发表于:2007-07-04来源:作者:点击数:
标签:
这是Include.jsp文件 !--thisistheInclude.jsp-- %@pagecontentType="text/html;charset=GB2312"% %@pagelanguage=" java "% HTML HEAD TITLE动态加载文件/TITLE /HEAD BODY CENTER FONTSIZE=10COLOR=blue动态加载文件/FONT /CENTER br HR br fontsize=5 !--
这是Include.jsp文件
<!-- this is the Include.jsp -->
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page language="
java" %>
<HTML>
<HEAD>
<TITLE>动态加载文件</TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 10 COLOR = blue>动态加载文件</FONT>
</CENTER>
<br>
<HR>
<br>
<font size=5>
<!-- 用jsp:include指令动态加载文件 -->
<jsp:include page="jspInsert.jsp">
<jsp:param name="name" value="jsp:include"/>
<jsp:param name="file" value="jspInsert.jsp"/>
</jsp:include>
</font>
</BODY>
</HTML>
下面是jspInsert.jsp文件
<HTML>
<BODY>
您好!这里我们用到了
<Font Color=Blue>
<%= request.getParameter("name")%>
</Font>
指令!
<BR>
我们在这里加载了文件:
<Font Color=Blue>
<%= request.getParameter("file")%>
</Font>。<br>
</HTML>
</BODY>
原文转自:http://www.ltesting.net