Frame 中使用Struts的问题 我用了html中的Frame,然后使用了Struts,结果是我在Action中无法接收到相关信息,这是怎么回事?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 main.jsp========================================<%@ page contentType="text/html;charset=Cp943C" %><%@ page language="java" %><html><head><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %><title>Employee</title></head><frameset framespacing="0" border="0" rows="80,100%" frameborder="0"> <frame name="top" scrolling="no" noresize target="main" src="top.jsp" marginwidth="0" marginheight="0"> <frameset cols="350,*"> <frame name="left" src="left.jsp" marginwidth="0" marginheight="0" scrolling="no" noresize></frame> <frame name="main" src="employee.do?event=list" target="left" scrolling="auto" noresize marginwidth="0" marginheight="0"> </frame> </frameset> <noframes> <body topmargin="0" leftmargin="0"> <p>hello</p> </body> </noframes></frameset></html>====================================================在top.jsp中我写的查询提交,然后,发送给employee.do,结果不能接收到数据。:( 在EmployeeAction.java中,request.getAttribute方法不能接收到任何东西用request.getParameter能接受到一些,但是我需要传递类阿。。 你是说你在top.jsp中setAttribute了?然后提交给main?那样你在后台是没有办法通过的request已经不是你在top中提交的那个request了,当然不能获得你在top中得到的东西了。 果然是,你的top的target是main,然后再由main提交给employee.do,这个时候employee.do得到请求已经不是top给main的那个请求了。解决的办法(不改变你当前框架)通过session传递,然后再后台employee.do得到属性后再在session中removeAttribute。只能这样。 你在top中提交的是一个request,在frame的employee.do中是另外一个request了,看来你对jsp和servlet中的scope生存周期还没有完全明白。对于你这个问题,只有用“imA(男的不会,会的不男)”的方法了。 哦听上去有些道理但是我不是这样的,top.jsp中的target 所指的main不是main.jsp而是<frame name="main" src="employee.do?event=list" target="left" scrolling="auto" noresize marginwidth="0" marginheight="0">不过,感觉你的说的差不多是对的。。我回去再试试 There is no Action问题 一个jsp问题 高手来吧:如何通过点击网页链接运行一个VB窗体? 有jsp的web开发中,客户端是什么? 急求高手指点web工程 linux下无法运行找不到servlat jsp中日期加一个数得到一个新的日期 菜鸟问题:struts中如何在action和JavaBean之见通信 这有一段代码,帮忙看看:为何说con为空? extjs+servlet+jdbc的项目 各位大神,帮我看看,给点思路 idea404错误 关于jsp数据库查询问题 用JSP如何拖拽控件啊?谢谢谢谢
========================================
<%@ page contentType="text/html;charset=Cp943C" %>
<%@ page language="java" %>
<html>
<head>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<title>Employee</title>
</head>
<frameset framespacing="0" border="0" rows="80,100%" frameborder="0">
<frame name="top" scrolling="no" noresize target="main" src="top.jsp" marginwidth="0" marginheight="0">
<frameset cols="350,*">
<frame name="left" src="left.jsp" marginwidth="0" marginheight="0" scrolling="no" noresize></frame>
<frame name="main" src="employee.do?event=list" target="left" scrolling="auto" noresize marginwidth="0" marginheight="0">
</frame>
</frameset>
<noframes>
<body topmargin="0" leftmargin="0"> <p>hello</p> </body>
</noframes>
</frameset>
</html>====================================================在top.jsp中我写的查询提交,然后,发送给employee.do,结果不能接收到数据。
:(
对于你这个问题,只有用“imA(男的不会,会的不男)”的方法了。
<frame name="main" src="employee.do?event=list" target="left" scrolling="auto" noresize marginwidth="0" marginheight="0">
不过,感觉你的说的差不多是对的。。我回去再试试