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.categorias.categorias.CategoriasNoticiasModificar.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 CategoriasNoticiasModificarFormImpl specificForm = (CategoriasNoticiasModificarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {// w w w.j a v a2 s . co m 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.estructuraseducativas.tesauros.alta.AdvertenciaBuscar.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 AdvertenciaBuscarFormImpl specificForm = (AdvertenciaBuscarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from w ww .j a v a 2 s . co m forward = _buscar(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.avanzado.recursos.importar.LocalAceptar.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 LocalAceptarFormImpl specificForm = (LocalAceptarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {// w w w. j a v a 2 s . co m forward = _importar(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.objetos.ruta.IndicarRutaBuscar.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 IndicarRutaBuscarFormImpl specificForm = (IndicarRutaBuscarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from w w w . j av a 2s . c o m forward = _buscar(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.informes.ode.InformeODEBuscar.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 InformeODEBuscarFormImpl specificForm = (InformeODEBuscarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/*from ww w . ja va 2 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.administracion.presentacion.nodos.listarNodos.FormularioListarNodosVerNodo.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 FormularioListarNodosVerNodoFormImpl specificForm = (FormularioListarNodosVerNodoFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* w w w . j a v a2s .c o m*/ forward = mapping.findForward("ver.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; }
From source file:es.pode.empaquetador.presentacion.avanzado.submanifiestos.gestor.GestorSubmanifiestosMetadato.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 GestorSubmanifiestosMetadatoFormImpl specificForm = (GestorSubmanifiestosMetadatoFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* www .j a v a 2s. co m*/ forward = mapping.findForward("metadato"); } 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.organizacion.RenombrarSubmit.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 RenombrarSubmitFormImpl specificForm = (RenombrarSubmitFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {/* w w w . j a va2s. c o m*/ forward = _submit(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.ejecutadas.ListadoEliminar.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 ListadoEliminarFormImpl specificForm = (ListadoEliminarFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from w ww.j a v a 2 s. c om forward = _submit(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.categoriasFaqs.categoriasFaqs.CategoriasFaqsVerCategoria.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 CategoriasFaqsVerCategoriaFormImpl specificForm = (CategoriasFaqsVerCategoriaFormImpl) form; org.apache.struts.action.ActionForward forward = null; try {//from w w w .ja va 2 s .co m forward = mapping.findForward("ver.categoria"); } 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; }