I am trying to create a search method using jsf but I am having problem with my code could anyone tell me what I am doing wrong.the method should allow the user to enter and query and pass the results to a table,I have 2 class.
When I test the code to see if it works I get this error
javax.el.MethodNotFoundException: /index.xhtml @19,84 action="#{search.searchresult}": Method not found: Controller.Search@f09285.searchresult()
Java code
@ManagedBean
public class Search {
    private String q;
    private List <Testpaper>test;
    public List<Testpaper> getTest() {
        return test;
    }
    public void setTest(List<Testpaper> test) {
        this.test = test;
    }
    public String getQ() {
        return q;
    }
    public void setQ(String q) {
        this.q = q;
    }
    public void getSearchresult()throws SQLException{
        test = new TestDAO().Searches(q);
    }
}
public class TestDAO {
@Resource(name="jdbc/GradeSprout2")
DataSource ds;
public List<Testpaper> Searches(String q)throws SQLException {
List<Testpaper> test = new ArrayList<Testpaper>();
if(ds==null)
        throw new SQLException("Can't get data source");
    //get database connection
    Connection con = ds.getConnection();
    if(con==null)
        throw new SQLException("Can't get database connection");
    PreparedStatement ps 
        = con.prepareStatement(
           "select * from test where testname like ?;"); 
     try{
         ps.setString(1, "%" + q + "%");
         ResultSet result = null;
             result =  ps.executeQuery();        
    while (result.next()) {
        Testpaper testpaper = new Testpaper();
        testpaper.setTestname(result.getString("testname"));
        test.add(testpaper);
    }}catch(Exception e1){
            }
            finally{
                try{
                    con.close();
                }
                catch(Exception e2){
                }
            }
    return test;
  } 
    public TestDAO(){
  try {
    Context ctx = new InitialContext();
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/GradeSprout2");
  } catch (NamingException e) {
    e.printStackTrace();
  }
}
}
JSF code
<h:form>
    <h:inputText size="95" value="#{search.q}"/>
    <br></br>
    <br></br>
    <h:commandButton value="Find Test" action="#{search.searchresult}">
    </h:commandButton>
</h:form>
<h:dataTable value="#{search.test}" var="test" rendered="#{not empty   search.test}">
    <h:column>#{test.testname}</h:column>
</h:dataTable>
<h:outputText value="No matches found!"
    rendered="#{not empty search.q and empty search.test}" />