Cannot find bean userActionForm in scope request
说的很清楚。

解决方案 »

  1.   

    你的ACTION中的VO传回的值要与你的JSP页面中的LOGIC中的NAME值一样,你才能正确的取到值
      

  2.   

    <logic:iterate id="userListAction" name="userActionForm" scope="request" type="com.jansky.weboa.entity.userActionForm">
      <tr>
        <td>&nbsp;<bean:write name="userListAction" property="user_id"/></td>
        <td>&nbsp;<bean:write name="userListAction" property="user_name"/></td>
        <td>&nbsp;<bean:write name="userListAction" property="user_pwd"/></td>
      </tr>
        </logic:iterate>改成上面的应该ok!
      

  3.   

    Action如下:
    package com.jansky.weboa.Action;import com.jansky.weboa.entity.*;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.util.Collection;
    import com.jansky.weboa.db.connPool;
    import com.jansky.weboa.db.userDAO;
    public class userListAction extends Action {
       private connPool pool;
      public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
       // userActionForm userActionForm = (userActionForm) actionForm;
       // throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");
        Connection con=null;
        con = pool.connPool();
        userDAO user = new userDAO(con);
        Collection col = user.userList();
        httpServletRequest.setAttribute("userActionForm", col);
        return actionMapping.findForward("success");  }}
    ActionForm如下:package com.jansky.weboa.entity;
    /**
     *Title:实体建模
     *Description:定义表user中列项的属性
     *Time:2004-9-15
     *Company:jansky
     *Author:黄晓华
     *version1.0
     */
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.util.ArrayList;
    public class userActionForm extends ActionForm {
      private String user_id;
      private String user_name;
      private String user_pwd; 
      public String getUser_id() {
        return user_id;
      }
      public void setUser_id(String user_id) {
        this.user_id = user_id;
      }
      public String getUser_name() {
        return user_name;
      }
      public void setUser_name(String user_name) {
        this.user_name = user_name;
      }
      public String getUser_pwd() {
        return user_pwd;
      }
      public void setUser_pwd(String user_pwd) {
        this.user_pwd = user_pwd;
      }
      public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
        /**@todo: finish this method, this is just the skeleton.*/
        return null;
      }
      public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
      }
    }
      

  4.   

    Action改为:
    Collection col = user.userList();
        httpServletRequest.setAttribute("userActionForm", col);
        return actionMapping.findForward("success");
      

  5.   

    晕,怎么就发出去了??Action改为:
        Collection col = user.userList();
        httpServletRequest.setAttribute("list", col);
        return actionMapping.findForward("success");jsp:<logic:iterate id="userListAction" name="list" scope="request" type="com.jansky.weboa.entity.userActionForm">
      <tr>
        <td>&nbsp;<bean:write name="userListAction" property="user_id"/></td>
        <td>&nbsp;<bean:write name="userListAction" property="user_name"/></td>
        <td>&nbsp;<bean:write name="userListAction" property="user_pwd"/></td>
      </tr>
        </logic:iterate>