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

jsp页面显示的奇怪问题。
a.jsp中有下面一段内容:
<jsp:include   page= "/bz/street/requisition/sl_frame.do ">
    <jsp:param   name= "num "   value= " <%=num%> "/>
    <jsp:param   name= "name "   value= " <%=name%> "/>
    <jsp:param   name= "jbname "   value= " <%=jbname%> "/>
    <jsp:param   name= "jbdate "   value= " <%=jbdate%> "/>
</jsp:include>

sl_frame.jsp的内容如下:
<%@   page   contentType= "text/html;   charset=GBK "   %>
<%@   page   import= "java.util.* "%>
<%
    String   num   =   (String)request.getAttribute( "num ");
    String   name   =   (String)request.getAttribute( "name ");
    String   jbname   =   (String)request.getAttribute( "jbname ");
    String   jbdate   =   (String)request.getAttribute( "jbdate ");
%>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
</head>  
<frameset   id= "myframeset "   rows= "30,*,0 "   style= "border:none ">
    <frame   src= "/bz/street/requisition/toolbar.do?page=1&allpage=1 "   name= "toolbar "   frameborder= "0 "   scrolling= "no "   noresize>
    <frame   src= "/bz/street/requisition/sl_main.do?num= <%=num%> &name= <%=name   %> &jbname= <%=jbname   %> &jbdate= <%=jbdate   %> "   name= "main "   frameborder= "0 "   scrolling= "no "   noresize>
    <frame   src= "/bz/street/requisition/sl_temp.do?num= <%=num%> &name= <%=name   %> &jbname= <%=jbname   %> &jbdate= <%=jbdate   %> "   name= "temp "   frameborder= "0 "   scrolling= "no "   noresize>
</frameset>
<noframes>
<body   bgcolor= "#FFFFFF "   text= "#000000 ">
</body>
</noframes>  
</html>

问题是:直接访问sl_frame.do可以正常显示,访问a.do就只显示a中的其他内容,sl_frame的内容显示不出来。
这是为什么啊?
和 <frameset> 标签有关系么?
请高手指教,谢谢!

------解决方案--------------------
<jsp:include page= "/bz/street/requisition/sl_frame.jsp ">

你include进来的是sl_frame.do

只能include jsp


------解决方案--------------------
如果你想include do的后缀名可以用struts中的includeAction。