dibu23 de Mayo del 2005
PreguntaEstoy haciendo una aplicación con struts y tengo unas dudas:
Mis clases se llaman:
tipoServicioActions //ActionForm
tipoServicioForm //Clase para el formulario
y el JSP se llama: prueba.jsp
tengo puesto en el struts-config esto:
...
<form-beans>
<form-bean name="pruebabean" type="unita.struts.forms.tipoServicioForm"/>
</form-beans>
<action-mappings>
<action
path="/grabar" //QUÉ ES ESTO Y QUE PONGO AQUI
type="unita.struts.action.tipoServicioActions"
scope="request"
name="pruebabean"
validate="false"
input="/prueba.jsp">
<forward name="Exito" path="/correcto.jsp" redirect="true"/>
</action>
</action-mappings>
....
La pregunta es ¿cómo le digo al formulario del JSP que cuando se haga clic en el botón ingresar se invoque al método addTipoServicio de la clase tipoServicioActions??
Este es mi archivo prueba.jsp:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:form action="¿QUÉ PONGO AQUÍ?" method="post">
Código:
<html:text value="" property="codigo"/>
<p>Descripción:
<html:text value="" property="descripcion"/>
<p><html:submit value="Guardar" property="guardar"/></p>
</html:form>
Gracias de antemano.
Salu2.
Mis clases se llaman:
tipoServicioActions //ActionForm
tipoServicioForm //Clase para el formulario
y el JSP se llama: prueba.jsp
tengo puesto en el struts-config esto:
...
<form-beans>
<form-bean name="pruebabean" type="unita.struts.forms.tipoServicioForm"/>
</form-beans>
<action-mappings>
<action
path="/grabar" //QUÉ ES ESTO Y QUE PONGO AQUI
type="unita.struts.action.tipoServicioActions"
scope="request"
name="pruebabean"
validate="false"
input="/prueba.jsp">
<forward name="Exito" path="/correcto.jsp" redirect="true"/>
</action>
</action-mappings>
....
La pregunta es ¿cómo le digo al formulario del JSP que cuando se haga clic en el botón ingresar se invoque al método addTipoServicio de la clase tipoServicioActions??
Este es mi archivo prueba.jsp:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:form action="¿QUÉ PONGO AQUÍ?" method="post">
Código:
<html:text value="" property="codigo"/>
<p>Descripción:
<html:text value="" property="descripcion"/>
<p><html:submit value="Guardar" property="guardar"/></p>
</html:form>
Gracias de antemano.
Salu2.
