Package javax.portlet

Examples of javax.portlet.PortletRequestDispatcher.forward()


            eventCount++;

            //we dispatch to servlet and assertions will be done there
            String queryString = "?key1=k1value1&key2=k2value1";
            PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA" + queryString);
            dispatcher.forward(request, response);

         }
      });

View Full Code Here


   }

   protected void dispatch(PortletRequest request, PortletResponse response, PortletContext portletContext) throws IOException, PortletException
   {
      PortletRequestDispatcher dispatcher = portletContext.getRequestDispatcher("/requestIncludeHopServlet/pathinfo1?foo1=bar1");
      dispatcher.forward(request, response);
   }
}
View Full Code Here

         {
            //we dispatch to servlet and assertions will be done there
            String queryString = "?key1=k1value1&key2=k2value1";
            PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA" + queryString);
            //
            dispatcher.forward(request, response);
            return null;
         }
      });

View Full Code Here

   }

   protected void dispatch(PortletRequest request, PortletResponse response, PortletContext portletContext) throws IOException, PortletException
   {
      PortletRequestDispatcher dispatcher = portletContext.getRequestDispatcher("/universalServletA/pathinfo?foo=bar");
      dispatcher.forward(request, response);
   }
}
View Full Code Here

         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
         {
            PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/noop");
            assertNotNull(prd);
            ServletFilter.ids.clear();
            prd.forward(request, response);
            assertEquals(Tools.toSet("INCLUDE_URL_PATTERN_FILTER", "INCLUDE_NAMED_FILTER"), ServletFilter.ids);

            //
            return new InvokeGetResponse(response.createRenderURL().toString());
         }
View Full Code Here

         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
         {
            PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getNamedDispatcher("NoopServlet");
            assertNotNull(prd);
            ServletFilter.ids.clear();
            prd.forward(request, response);
            assertEquals(Collections.singleton("INCLUDE_NAMED_FILTER"), ServletFilter.ids);

            //
            return new EndTestResponse();
         }
View Full Code Here

            writer.print("@ShouldNotBePresent@");

            //
            PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/ForwardedRequestContentServlet");
            assertNotNull(prd);
            prd.forward(request, response);

            //
            assertTrue(response.isCommitted());

            //
View Full Code Here

            writer.print("@ShouldNotBePresent@");

            //
            PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getNamedDispatcher("ForwardedNamedContentServlet");
            assertNotNull(prd);
            prd.forward(request, response);

            //
            assertTrue(response.isCommitted());

            //
View Full Code Here

              portletRequestDispacher.include(portletRequest, portletResponse);
            }

            // Otherwise, "forward" to the specified path.
            else {
              portletRequestDispacher.forward(portletRequest, portletResponse);
            }
          }
        }

        // Otherwise, must be a portlet container like Liferay, and so need to "include" the specified path.
View Full Code Here

        logger.debug("Detected non-Faces resource");

        String resourceId = resourceRequest.getResourceID();
        PortletRequestDispatcher portletRequestDispatcher = portletContext.getRequestDispatcher(resourceId);
        portletRequestDispatcher.forward(resourceRequest, resourceResponse);
      }

      // Otherwise, must be an Ajax (partial-submit) request. Though technically a postback type of request,
      // Ajax requests also utilize the portlet RESOURCE_PHASE. Therefore treat it like a postback, and
      // execute the entire Faces lifecycle: RESTORE_VIEW, APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.