Olá Pessoal , estou rodando um exemplo de Struts+Ajax e estou com esse seguinte erro:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Exception creating bean of class app.MyForm: {1}
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.pages.usuario_005fvalido_jsp._jspService(org.apache.jsp.pages.usuario_005fvalido_jsp:75)
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:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Abaixo vai minha classe:
App.MyForm
package app;
import org.apache.struts.action.ActionForm;
public class MyForm extends ActionForm {
protected String rssUrl;
protected String categoria;
protected String nameUser;
/**
* @return the categoria
*/
public String getCategoria() {
return categoria;
}
/**
* @param categoria the categoria to set
*/
public void setCategoria(String categoria) {
this.categoria = categoria;
}
/**
* @return the nameUser
*/
public String getNameUser() {
return nameUser;
}
/**
* @param nameUser the nameUser to set
*/
public void setNameUser(String nameUser) {
this.nameUser = nameUser;
}
/**
* @return the rssUrl
*/
public String getRssUrl() {
return rssUrl;
}
/**
* @param rssUrl the rssUrl to set
*/
public void setRssUrl(String rssUrl) {
this.rssUrl = rssUrl;
}
}
Parte do Meu Struts Config
<form-beans>
<form-bean name="cadastroform" type="app.CadastroForm" />
<form-bean name="myForm" type="app.MyForm" />
</form-beans>
<action path="/usuario_valido" type="app.UsuarioValidoAction" name="myForm" />
<action path="/sub_categoria" type="app.SubCategoriaAction" name="myForm">
<forward name="listSubCategoria" path="/pages/sub_categoria.jsp" />
</action>
<action path="/leitor_xml" type="app.LeitorXmlAction" name="myForm" />
Finalmente a .Jsp
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html:html>
<head>
<title>Usuário Válido</title>
<script type="text/javascript" src="js/ajax.js"></script>
<script>
function isProcessAjaxUsuario() {
if(isAjax()){
document.getElementById("theResponse").innerHTML = objRequest.responseText;
}
}
</script>
</head>
<body>
<center>
<html:form action="usuario_valido.do">
Informe um usuário: <html:text property="nameUser" onkeydown="if(window.event.keyCode == 13){ajaxProcess(this.form, isProcessAjaxUsuario); return false;}" /> <br/>
<html:button property="button" onclick="ajaxProcess(this.form, isProcessAjaxUsuario)" />
</html:form>
<span id="theResponse"></span>
</center>
</body>
</html:html>
Att. Reis