Ok ... your email client is weird in how it put's html in, but that's a different subject. The stack trace indicates that logic:iterate can't find the collection you stored in "usersList". You could wrap the whole table in logic:present tag and then have some error message in a logic:notPresent tag to better diagnose what's going on. Are you sure your action is being executed?

--David


Carlos Morales wrote:
I hope this time sources work and you can see them:
The mistake is this one:
org.apache.jasper.JasperException: Cannot find bean usersList in scope request
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

causa raíz javax.servlet.ServletException: Cannot find bean usersList in scope request
        
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
        
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
        
org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:148)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

causa raíz javax.servlet.jsp.JspException: Cannot find bean usersList in scope request
        org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
        
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
        
org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:96)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

nota La traza completa de la causa de este error se encuentra en los archivos 
de diario de Apache Tomcat/5.5.16.
________________________________

the sources are these ones:
//BeanNames.java
package com.genausal.actions;
public interface BeanNames {
   public static final String PROJECT_LIST="projectList";
   public static final String USERS_FORM="UsersForm";
   public static final String USER_LIST="usersList";
}
//Web_AdminAction.java

package com.genausal.actions;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionServlet;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import com.genausal.databases.util.ConnectionPool;
import com.genausal.databases.UsersDAO;
import com.genausal.entity.Users;
/** * MyEclipse Struts
 * Creation date: 06-26-2008
* * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="success" path="/web_admin.jsp"
 */
public class Web_AdminAction extends Action {
 // --------------------------------------------------------- Instance Variables
       private ConnectionPool pool;
 // --------------------------------------------------------- Methods
/** * Method execute
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return ActionForward
  */
public Web_AdminAction(){
      pool=ConnectionPool.getInstance();
     }
public ActionForward perform(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)throws IOException,ServletException {
  Connection con=null;
  try{
   con=pool.getConnection();
   UsersDAO usersDAO=new UsersDAO(con);
   Collection col=usersDAO.findAll();
request.setAttribute(BeanNames.USER_LIST,col); return mapping.findForward("success");
  }catch (SQLException e){
   e.printStackTrace();
   throw new RuntimeException("It's impossible to get the connection");
  }finally{
   try{
    if(con!=null)
     con.close();
   }catch(SQLException e){
    throw new RuntimeException(e.getMessage());
   }
  }
}
}
//UsersDAO.java ->findAll()
public Collection findAll(){
PreparedStatement ps=null;
   ResultSet rs=null;
   ArrayList list=new ArrayList();
String sql="SELECT * from users"; try{
    if(con.isClosed()){
     throw new IllegalStateException("error.unexpected");
    }
ps=con.prepareStatement(sql);
    rs=ps.executeQuery();
while(rs.next()){
     Users users=new Users();
     users.setpassport_id(rs.getString(1));
     users.setlast_name(rs.getString(2));
     users.setfirst_name(rs.getString(3));
     users.setaddress(rs.getString(4));
     users.setphone(rs.getString(5));
     users.setcountry(rs.getString(6));
     users.setcity(rs.getString(7));
     users.setstate(rs.getString(8));
     users.setcategory(rs.getString(9));
     users.setmail(rs.getString(10));
     users.setc_password(rs.getString(11));
     users.setpassword(rs.getString(12));
list.add(users); }
    return list;
   }catch(SQLException e){
    e.printStackTrace();
    throw new RuntimeException("error.unexpected");
   }finally{
    try{
     if(ps!=null)
      ps.close();
     if(rs!=null)
      rs.close();
    }catch(SQLException e){
     e.printStackTrace();
     throw new RuntimeException("error.unexpected");
    }
   }
  }
//web_adminContent.jsp
<%@ <%@ <%@ <%@ taglib uri="/bean" prefix="bean" %>taglib uri="/html" prefix="html" %>taglib uri="/logic" prefix="logic" %>taglib uri="/template" prefix="template" %><
<
<br/>br/>html:errors/><
<
</center>h2>Users Management page :</h2>center><
<
<
<
<
<
</
<
<
<
<
</
</
<
<
</
<
<
</
</
</
</
I hope this time you can see it and you can help me with this mistake. Thanks so muchcenter>table width="70%">tr>th width="25%" bgcolor=#c7c1c0>Passport</th>th width="30%" bgcolor=#F27600>Users Name</th>th width="25%" bgcolor=#c7c1c0>Country</th>tr>logic:iterate 
id="users" name="usersList" scope="request" type="com.genausal.entity.Users">tr>a href="consultuseradmin.do?passport_id"=<bean:writename="users"property="passport_id"/>">bean:write name="users" 
property="passport_id"/>a>tr>tr>bean:write name="users" property="first_name"/>tr>tr>bean:write name="users" property="country"/>tr>logic:iterate>table>center>


______________________________________________ Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
David Smith
Programmer/Analyst
College of Agriculture and Life Sciences
Cornell University
B32 Morrison Hall
Ithaca, NY 14853
Phone: (607) 255-4521


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to