lego2816
发贴: 2
积分: 0
|
于 2008-06-01 16:51
跳转时无法到达最终页面,原先是想先是通过index.jsp页面 <logic:redirect action="/note.do?method=show"/>转至一个action 用action连接数据库后放在request,然后转至note_show.jsp。但是最后结果只是停在action那里。我很急!!希望大家多多指教!谢谢大家啊!!!部分主要代码如下: -----index.jsp <logic:redirect action="/note.do?method=show"/>
----NoteAction.java public ActionForward show(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) { ApplicationContext ctx=new ClassPathXmlApplicationContext("ApplicationContext.xml"); NoteDAO dao=(NoteDAO)ctx.getBean("NoteDAOProxy"); List notes=dao.findAll(); request.setAttribute("note",notes); return mapping.findForward("note.show.suc");
}
-----note_show.jsp <logic:iterate id="note" name="note" > <table> <tr> <bean:write name="note" property="menber"/> </tr> <tr> <bean:write name="note" property="title"/> </tr> <tr> <bean:write name="note" property="ncontent"/> </tr> <tr> <bean:write name="note" property="publishtime"/> </tr> </table> </logic:iterate>
|