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.planificador.informeTrabajo.MostrarDescripcionVolver.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 MostrarDescripcionVolverFormImpl specificForm = (MostrarDescripcionVolverFormImpl) form;

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

    try {/*from  w ww  . j  av a2 s .  c  om*/
        forward = _cargar(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.catalogadorWeb.presentacion.taxonomias.TaxonomiaConsultaPadre.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 TaxonomiaConsultaPadreFormImpl specificForm = (TaxonomiaConsultaPadreFormImpl) form;

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

    try {//from  w ww.j  a  v a 2  s  .  c  om
        forward = _consultaPadre(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.catalogadorWeb.presentacion.verMetadatos.RelacionesFormVuelveDeRelaciones.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 RelacionesFormVuelveDeRelacionesFormImpl specificForm = (RelacionesFormVuelveDeRelacionesFormImpl) form;

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

    try {//from  w  w w .j ava  2 s  .  c o m
        forward = mapping.findForward("vuelve.de.relaciones");
    } 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.faqs.crear.FormularioCrearVolver.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 FormularioCrearVolverFormImpl specificForm = (FormularioCrearVolverFormImpl) form;

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

    try {// w  ww.  ja  v  a  2  s.  co  m
        forward = _obtenerCategoria(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.buscador.presentacion.avanzado.tesauros.TesaurosBuscarTerminos.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 TesaurosBuscarTerminosFormImpl specificForm = (TesaurosBuscarTerminosFormImpl) form;

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

    try {//from  w  ww  .j av  a 2 s.c  o m
        forward = _buscarTerminos(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.catalogadorWeb.presentacion.categoriasAvanzado.ciclodevida.CicloValidoVolver.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 CicloValidoVolverFormImpl specificForm = (CicloValidoVolverFormImpl) form;

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

    try {/*from   w w w. ja va  2 s.c o m*/
        forward = _cargarLifeCycleValidar(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.catalogadorWeb.presentacion.tesauros.TesaurosFormConsultaNodo.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 TesaurosFormConsultaNodoFormImpl specificForm = (TesaurosFormConsultaNodoFormImpl) form;

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

    try {//  ww  w  . j  a  v  a2s . c  o  m
        forward = _consultaId(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.empaquetador.presentacion.basico.asociar.archivos.ArchivosAsociar.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 ArchivosAsociarFormImpl specificForm = (ArchivosAsociarFormImpl) form;

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

    try {//from w  w  w  .  ja va2  s.co m
        forward = _asociar(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.objetosDespublicados.MostrarODESDespublicadosVerHistorial.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 MostrarODESDespublicadosVerHistorialFormImpl specificForm = (MostrarODESDespublicadosVerHistorialFormImpl) form;

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

    try {/*w w  w.ja v a2s  .c o m*/
        forward = mapping.findForward("ver.historial");
    } 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.Publicar.PublicarODECancelar.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 PublicarODECancelarFormImpl specificForm = (PublicarODECancelarFormImpl) form;

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

    try {//from   w  w  w  . j  a va  2 s  .c o m
        forward = __despublicado(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;
}