frameset 搞笑问题
framest 页面代码如下:
<%@ page
language= "java " contentType= "text/html; charset=GBK " pageEncoding= "GBK "
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
<html:html locale= "true ">
<head>
<META http-equiv= "Content-Type " content= "text/html; charset=GBK ">
<title> main.jsp </title>
<!--
<link rel= "stylesheet " type= "text/css " href= "styles.css ">
-->
</head>
<frameset cols= "130,* " frameborder= "NO " border= "0 " framespacing= "0 ">
<frame name= "leftFrame " src= "/mail/left.jsp ">
<frame name= "mainFrame " src= "send.action ">
</frameset>
<noframes> <body>
<p> 不行啊,不支持FRAMSET </p>
</body> </noframes>
</html:html>
出现的问题是从IE地址栏输入frameset页面时,页面显示正常,但,从ACTION转发到framset页面时左边的页面提示The requested resource (/mail/left.jsp) is not available.
但右边的页面正常.也试过将左边连接改为多种形式,如:src= "../mail/left.jsp " src= " /left.jsp " src= "left.jsp "情况都一样.
------解决方案-------------------- 最安全的办法用.do(left.do)
用jsp直接连的话最好加上
request.getContextPath()
但我试过 src= " <%=request.getContextPath()%> /mail/left.jsp "
这样才不至于把路径问题给高混乱~