List of usage examples for javax.servlet.http HttpServletRequest getParameterNames
public Enumeration<String> getParameterNames();
Enumeration
of String
objects containing the names of the parameters contained in this request. From source file:es.pode.administracion.presentacion.planificador.listarTareasPendientes.ListarModificar.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 ListarModificarFormImpl specificForm = (ListarModificarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from w w w .j a v a2s . c om forward = mapping.findForward("modificar"); } 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.TesaurosCancelar.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 TesaurosCancelarFormImpl specificForm = (TesaurosCancelarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* www . j a v a 2s. c om*/ forward = mapping.findForward("cancelar"); } 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.Rechazar.RechazarCancelar.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 RechazarCancelarFormImpl specificForm = (RechazarCancelarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/*from www .java 2 s . c om*/ forward = mapping.findForward("cancelar"); } 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.eliminarOdes.ConfirmacionBuscar.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 ConfirmacionBuscarFormImpl specificForm = (ConfirmacionBuscarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {// ww w .jav a 2 s .c o m forward = mapping.findForward("buscar"); } 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.basico.enviarMail.EnvioMailCancelar.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 EnvioMailCancelarFormImpl specificForm = (EnvioMailCancelarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/*from w ww.j a va 2 s . c o m*/ forward = mapping.findForward("cancelar"); } 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.noticias.noticias.NoticiasModificar.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 NoticiasModificarFormImpl specificForm = (NoticiasModificarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {// w w w .ja va 2 s.com forward = mapping.findForward("modificar"); } 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.listarTareasEnEjecucion.ListarPararTarea.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 ListarPararTareaFormImpl specificForm = (ListarPararTareaFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* www . ja v a 2s .c o m*/ forward = mapping.findForward("parar.tarea"); } 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.pendientes.ListadoPlanificar.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 ListadoPlanificarFormImpl specificForm = (ListadoPlanificarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from ww w .j a v a2 s .com forward = mapping.findForward("planificar"); } 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.gestor.GestorBasicoAsociar.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 GestorBasicoAsociarFormImpl specificForm = (GestorBasicoAsociarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* w ww . j a va2s.c om*/ forward = mapping.findForward("asociar"); } 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.gestor.GestorBasicoGuardar.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 GestorBasicoGuardarFormImpl specificForm = (GestorBasicoGuardarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/*from w w w. j a v a 2 s . c o m*/ forward = mapping.findForward("guardar"); } 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; }