日期:2014-05-18  浏览次数:20608 次

问个有关include 的问题
<%@include   file= "/wz/page/top.jsp "%>
<TABLE   width= "730 "   cellPadding= "0 "   align= "center "   border= "0 "   cellSpacing= "0 ">
<TBODY>
<TR>
<TD   vAlign= "top "   width= "205 ">
<DIV   align= "left "> <%@include   file= "/wz/page/studymid.jsp "%> </DIV>
</TD>
<TD   vAlign= "top "   width= "1 "> </TD>
<TD   vAlign= "top "   width= "520 ">
<DIV   align= "left "> <jsp:include   page= "http://www.163.com "   flush= "true "/> </DIV>
</TD>
<TD   vAlign= "top "> </TD>
</TR>
</TBODY>
</TABLE>
<%@include   file= "/wz/page/foot.jsp "%>

怎么让http://www.163.com显示在jsp:include中,如果直接用 <%include   file= " "%> 的话编译器会报错
谁能帮助我,

------解决方案--------------------
楼主是想把163的主页嵌入到你的页面中?
------解决方案--------------------
<%include file= " "%> 是静态加载,它和函数调用一样,主页面不会改变。
你要想连到163.com的话,这个不行吧。你用 <a href=.....> 加个按扭连过去不就好 了 ?
------解决方案--------------------
用iframe

<iframe src= "http://www.163.com " height= "100 " width= "100 " />
------解决方案--------------------
还是家链接吧 文字的图片的都可以
------解决方案--------------------
前提是你要访问的这个页面http://www.163.com在你的项目中,路径是在项目中的相对路径,否则一定报错。
------解决方案--------------------
<jsp:forward/> 可以用绝对路径吗? 我没试过
------解决方案--------------------
<jsp:forward> , <jsp:include> , <@include> 都只能使用相对路径,如果以/开头,表示相对于当前web应用程序的根目录.