Example usage for javax.servlet.http HttpServletRequest getParameterNames

List of usage examples for javax.servlet.http HttpServletRequest getParameterNames

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest getParameterNames.

Prototype

public Enumeration<String> getParameterNames();

Source Link

Document

Returns an Enumeration of String objects containing the names of the parameters contained in this request.

Usage

From source file:es.pode.administracion.presentacion.faqs.verFaq.FormularioUnoSiguiente.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final FormularioUnoSiguienteFormImpl specificForm = (FormularioUnoSiguienteFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/* www . j  a  v  a2  s  . c  o m*/
        forward = _verPasoDos(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.administracion.presentacion.planificador.listarTareasPendientes.ListarEliminar.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final ListarEliminarFormImpl specificForm = (ListarEliminarFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/*w  w  w  .  ja va 2s. co m*/
        forward = _obtenerNombresTrabajos(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.gestorFlujo.presentacion.objetosPendientes.MostrarODESPendientesDespublicados.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final MostrarODESPendientesDespublicadosFormImpl specificForm = (MostrarODESPendientesDespublicadosFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/*from w  w  w. j  av  a 2 s  .c  om*/
        forward = mapping.findForward("despublicados");
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.modificador.presentacion.configurar.modificacion.ConfirmacionCambiosBuscar.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final ConfirmacionCambiosBuscarFormImpl specificForm = (ConfirmacionCambiosBuscarFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/* w w w.ja va2  s  .  c om*/
        forward = _busqueda(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.modificador.presentacion.configurar.modificacion.ConfirmacionObjetosBuscar.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final ConfirmacionObjetosBuscarFormImpl specificForm = (ConfirmacionObjetosBuscarFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {//from  ww w. jav a  2s .c  o  m
        forward = _busqueda(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.modificador.presentacion.simular.SimularModificacionBuscar.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final SimularModificacionBuscarFormImpl specificForm = (SimularModificacionBuscarFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {//from w w  w .j a v a 2s  . com
        forward = _busqueda(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.visualizador.presentacion.descargas.DescargasDescarga.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final DescargasDescargaFormImpl specificForm = (DescargasDescargaFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {//from  w  w w . j ava  2 s  .  c  om
        forward = _descargar(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.administracion.presentacion.adminusuarios.altaGrupo.FormularioAltaAceptar.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final FormularioAltaAceptarFormImpl specificForm = (FormularioAltaAceptarFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/*ww  w  .ja  v a2s .  c  om*/
        forward = _altaGrupo(mapping, form, request, response);
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.administracion.presentacion.adminusuarios.listarUsuariosPendientes.FormularioListadoUsuariosPendientesAlta.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final FormularioListadoUsuariosPendientesAltaFormImpl specificForm = (FormularioListadoUsuariosPendientesAltaFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/*  w ww .j  a  va  2  s .  co m*/
        forward = mapping.findForward("alta");
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}

From source file:es.pode.administracion.presentacion.nodos.listarNodos.FormularioListarNodosModificarNodo.java

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
        org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {
    final FormularioListarNodosModificarNodoFormImpl specificForm = (FormularioListarNodosModificarNodoFormImpl) form;

    org.apache.struts.action.ActionForward forward = null;

    try {/* w  ww . ja v  a 2s . c  om*/
        forward = mapping.findForward("modificar.nodo");
    } catch (java.lang.Exception exception) {
        // we populate the current form with only the request parameters
        Object currentForm = request.getSession().getAttribute("form");
        // if we can't get the 'form' from the session, try from the request
        if (currentForm == null) {
            currentForm = request.getAttribute("form");
        }
        if (currentForm != null) {
            final java.util.Map parameters = new java.util.HashMap();
            for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();) {
                final String name = String.valueOf(names.nextElement());
                parameters.put(name, request.getParameter(name));
            }
            try {
                org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
            } catch (java.lang.Exception populateException) {
                // ignore if we have an exception here (we just don't populate).
            }
        }
        throw exception;
    }
    request.getSession().setAttribute("form", form);

    return forward;
}