Gostaria de saber como fica na class action? eu fiz assim;[code]public class BuscaObjetoAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
BuscaObjetoForm formulario = (BuscaObjetoForm) form;
List<Teste> lista = new ArrayList<Teste>();
DAO dao = new DAO();
listaNome = (List<Teste>) dao.buscar("nome", formulario.getNome(), true, new Teste());
if (!lista.isEmpty()) {
request.setAttribute("teste", listaNome);
return mapping.findForward("sucesso");
} else {
return mapping.findForward("error");
}
}[/code] no form esta [code]package web.correntista.model.forms;
import org.apache.struts.action.ActionForm;
public class BuscaObjetoForm extends ActionForm{
private String nome;
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}[/code] no jsp fiz assim:[code]<%@page contentType=“text/html” %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix=“html” %>
JSP Page <br><br>
<center> <table>
<html:form action="pesquisaf.do">
<td> Nome:</td><td> <html:text property="nome"/></td>
<tr><td><html:submit value="Pesquisar"/></td></tr>
</html:form>
</table></center></body>
</html>
[/code] nao sei porque nao esta dando certo alguem pode mim ajudar? valeu!