跳转时无法到达最终页面,原先是想先是通过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>

解决方案 »

  1.   

    http://topic.csdn.net/u/20080530/10/c37caaa5-a908-4921-8c95-4df221dda8a8.html
    见我在这个帖子的回复
      

  2.   

      note.show.suc 这个在 Struts-config.xml文件里面怎么配的写清楚.....
      

  3.   

    Struts-config.xml里面的配置···
    <action
          attribute="noteForm"
          input="/Admin/note/note_show.jsp"
          name="noteForm"
          parameter="method"
          path="/note"
          scope="request"
          type="cn.bookshop.struts.action.NoteAction" >
          <forward name="note.show.suc" path="/Admin/note/note_show.jsp"/>
    </action>
      

  4.   

    我想做一个页面,就比如一个网站的首页,打开后直接就能显示出数据库里的每条记录。于是我先通过index.jsp的重定向来得到一个action,然后通过这个action来遍历数据库,再转至note_show.jsp来显示数据!!!!麻烦了!谢谢
      

  5.   

    症状就是它只到达了action那里,就没有继续跳转到note_show.jsp页面了!就好像那个return mapping.findForward("")没取到作用一样!!!!