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.catalogadorWeb.presentacion.categoriasAvanzado.derechos.ValidoOKVolver.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 ValidoOKVolverFormImpl specificForm = (ValidoOKVolverFormImpl) form;

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

    try {/*from   ww  w.j a v a 2 s.com*/
        forward = _cargarDerechosValidar(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.MostrarODESDespublicadosPendientes.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 MostrarODESDespublicadosPendientesFormImpl specificForm = (MostrarODESDespublicadosPendientesFormImpl) form;

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

    try {/*from   w ww . j  a  v  a 2s . c o m*/
        forward = mapping.findForward("pendientes");
    } 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.noticia.NoticiaCategoria.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 NoticiaCategoriaFormImpl specificForm = (NoticiaCategoriaFormImpl) form;

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

    try {//from   w w w . ja  v  a 2s.  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:net.cit.tetrad.resource.MainResource.java

/**
 *  ?? // w w  w . j a va 2s. c  om
 * @param dto
 * @return
 * @throws Exception
 */
@SuppressWarnings("rawtypes")
@RequestMapping("/mainList.do")
public void mainList(HttpServletRequest request, HttpServletResponse response, CommonDto dto) throws Exception {
    log.debug("start - mainList()");

    //iDisplayStart iDisplayLength datatable? ??     
    int pageNumber = Integer.parseInt(Utility.isNullNumber(request.getParameter("iDisplayStart")));
    int nPerPage = Integer.parseInt(Utility.isNullNumber(request.getParameter("iDisplayLength")));
    log.debug("pageNumber=" + pageNumber + ", nPerPage=" + nPerPage);

    Enumeration parameter = request.getParameterNames();
    log.debug(parameter.toString());
    while (parameter.hasMoreElements()) {
        String pName = (String) parameter.nextElement();
        String pValue = request.getParameter(pName);
        log.debug(pName + " = " + pValue);
    }

    try {
        int sEcho = Integer.parseInt(Utility.isNullNumber(request.getParameter(REQ_SECHO)));

        PersonJson result = setPersonJson(sEcho, dto, pageNumber, nPerPage);
        JSONObject jsonObject = JSONObject.fromObject(result);

        Writer writer = setResponse(response).getWriter();
        writer.write(jsonObject.toString());

        log.debug(jsonObject.toString());
        writer.flush();
    } catch (Exception e) {
        log.error(e, e);
    }

    log.debug("end - mainList()");
}

From source file:es.pode.empaquetador.presentacion.avanzado.recursos.crear.elementos.RecursoMetadato.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 RecursoMetadatoFormImpl specificForm = (RecursoMetadatoFormImpl) form;

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

    try {//from  ww w. j ava 2 s.  c  o  m
        forward = _datosCatalogacion(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.MostrarODESPendientesVerHistorial.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 MostrarODESPendientesVerHistorialFormImpl specificForm = (MostrarODESPendientesVerHistorialFormImpl) form;

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

    try {/*from  w w w.j  a v a 2s.co  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.objetosPersonales.MostrarODESPersonalesVerHistorial.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 MostrarODESPersonalesVerHistorialFormImpl specificForm = (MostrarODESPersonalesVerHistorialFormImpl) form;

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

    try {/*  w ww .ja  v  a 2  s.  c om*/
        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.objetosPropuestos.MostrarODESPropuestosVerHistorial.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 MostrarODESPropuestosVerHistorialFormImpl specificForm = (MostrarODESPropuestosVerHistorialFormImpl) form;

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

    try {/*from  ww  w . j av  a2 s  .  c  om*/
        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.objetosPublicados.MostrarODESPublicadosVerHistorial.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 MostrarODESPublicadosVerHistorialFormImpl specificForm = (MostrarODESPublicadosVerHistorialFormImpl) form;

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

    try {//from   w w w  .j  av  a 2 s .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.administracion.presentacion.catalogacion.modificarCatalogadores.ResultadoModificarCatalogadoresVolver.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 ResultadoModificarCatalogadoresVolverFormImpl specificForm = (ResultadoModificarCatalogadoresVolverFormImpl) form;

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

    try {//from w  w  w  .ja  v a2 s  .c  o m
        forward = mapping.findForward("volver");
    } 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;
}