/*
 * RegistrarAction.java
 *
 * Created on 7 de noviembre de 2007, 11:29
 */

package servlets;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import modelo.*;
import javabeans.*;
public class RegistrarAction extends Action {
    
    
    public ActionForward execute(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        String driver=this.getServlet().getServletContext().getInitParameter("driver");
        String cadenaCon=this.getServlet().getServletContext().getInitParameter("cadenaCon");
        GestionClientes gc=new GestionClientes(driver,cadenaCon);
        RegistroForm rf=(RegistroForm)form;
        gc.registrar(rf);
        return mapping.findForward("registrado");
        
    }
}
