Link to home
Start Free TrialLog in
Avatar of khoa235
khoa235

asked on

Help me!

I have a class ListBean. Include getMusic() method: get a field in DB:
public Vector getMusic() throws ModuleException
{
        Vector albums = new Vector();
        Connection con = null;
        Statement stmt = null;
        ResultSet rs = null;
        String sQuery = "";
       try
      {
      con = dataSource.getConnection();  
              //Thuc hien truy van du lieu
              stmt = con.createStatement();
      sQuery = "SELECT a FROM HE";
      rs = stmt.executeQuery(sQuery);
      while (rs.next())
      {
            TourDTO tD=new TourDTO();                        
            tD.setMaKH(rs.getString("a"));
            albums.add(tD);
      }
      }
      catch (SQLException se)
    {
        log.error("Error in retreiving albums.");
        log.error("SQL statement = " + sQuery);
        se.printStackTrace();
        ModuleException me = new ModuleException("error.db.sql");
       throw me;
  }
I want fill data into combox box over getMusic() method. Following code here:
/*******ListAction********/
ListBean lB=new ListBean(getDataSource(request, "HE"));
               Vector someBean= lB.getMusic();
               request.setAttribute("someBean", someBean);
      return mapping.findForward("list");
/*******Code into JSP page*****/
<logic:present name="someBean">
      <html:select property="someBean">
            <html:options collection="someBean" property="value" labelProperty="label"/>
      </html:select>
</logic:present>
When enter URL: "http://localhost:8080/Loginc/list.do" appear a error: "No getter method available for property value for bean under name someBean"
Althought I am declaring someBean property in ListForm class. I don't know why have this error. Everybody help me, please!Thanks very much.

ASKER CERTIFIED SOLUTION
Avatar of boonleng
boonleng
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial