比如一个叶面index.jsp里面还包含框架indexpro1.jsp通过index.do 指向到index.jsp,并传递了一些数据。如下列代码
request.setAttribute("article1", article1);
request.setAttribute("articlepic", articlepic);
return mapping.findForward("indexdo");
//indexdo 指向index.jspindex.jsp能接受到传递的参数。但index.jsp叶面还包含了个框架indexpro1.jsp,<iframe id="ifr1" name="ifr1" width="100%" height="755" scrolling="no" src="indexpro1.jsp" frameborder="0"></iframe>那么我的这个系统Struts的情况下,通过.do,只能指向index.jsp,怎么传递数据给框架内的文件呢!?我自己暂时只知道通过框架文件的get方式传递。如下
<iframe id="ifr1" name="ifr1" width="100%" height="755" scrolling="no" src="indexpro1.jsp?参数名=参数值" frameborder="0"></iframe>除此之外,还有啥好方法?
request.setAttribute("article1", article1);
request.setAttribute("articlepic", articlepic);
return mapping.findForward("indexdo");
//indexdo 指向index.jspindex.jsp能接受到传递的参数。但index.jsp叶面还包含了个框架indexpro1.jsp,<iframe id="ifr1" name="ifr1" width="100%" height="755" scrolling="no" src="indexpro1.jsp" frameborder="0"></iframe>那么我的这个系统Struts的情况下,通过.do,只能指向index.jsp,怎么传递数据给框架内的文件呢!?我自己暂时只知道通过框架文件的get方式传递。如下
<iframe id="ifr1" name="ifr1" width="100%" height="755" scrolling="no" src="indexpro1.jsp?参数名=参数值" frameborder="0"></iframe>除此之外,还有啥好方法?
你就不用mpping.findForward 用request.getRequestDispatcher(url).forward(request,response)这样你可以传参数
就是再框架内再包含一个indexpro.do?action=pro1 不就成了!呵呵。一般框架内包含文件,哪位仁兄还有高见?