frameset(iframe)用法2
上一篇是垂直布局,现在放一个水平布局的demo
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <frameset cols="50,50" frameborder="NO" border="0" framespacing="0" rows="*"> 2 <iframe src="<%=rpath %>mygrouptable.jsp?uid=<%=uid %>" height="300" frameborder="0" scrolling="auto"></iframe> 3 4 <iframe src="<%=rpath %>othergrouptable.jsp?uid=<%=uid %>" height="300" frameborder="0" scrolling="auto"></iframe> 5 </frameset>
其实的rpath可由下面两句获得:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <% 2 String path=request.getContextPath(); 3 String rpath=request.getScheme()+"://" + request.getServerName()+":" + 4 request.getServerPort() + path + "/"; 5 %>