Package org.strecks.web

Examples of org.strecks.web.RedirectHelper


    c.readAnnotations(action.getClass());
    Map<String, InjectionWrapper> inputs = c.getInjectionMap();

    HttpServletRequest request = createMock(HttpServletRequest.class);
    RedirectHelper redirectHelper = createMock(RedirectHelper.class);

    expect(request.getAttribute(InfrastructureKeys.REDIRECT_HELPER)).andReturn(redirectHelper);

    replay(request);
    replay(redirectHelper);
View Full Code Here


  public void testGetActionForward()
  {

    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
    HttpSession session = createStrictMock(HttpSession.class);
    RedirectHelper redirectHelper = createStrictMock(RedirectHelper.class);

    expect(request.getAttribute(InfrastructureKeys.REDIRECT_HELPER)).andReturn(redirectHelper);
    expect(redirectHelper.getRequestParameters()).andReturn(getRequestParameters());
    expect(request.getSession()).andReturn(session);
    expect(redirectHelper.getSessionParameters()).andReturn(getSessionParameters());
    session.setAttribute(InfrastructureKeys.REDIRECT_PARAMETERS, getSessionParameters());

    replay(request);
    replay(session);
    replay(redirectHelper);
View Full Code Here

{

  public Object getValue(ActionContext injectionContext)
  {
    HttpServletRequest request = injectionContext.getRequest();
    RedirectHelper redirectHelper = (RedirectHelper) request.getAttribute(InfrastructureKeys.REDIRECT_HELPER);

    if (redirectHelper == null)
    {
      redirectHelper = new RedirectHelperImpl();
      request.setAttribute(InfrastructureKeys.REDIRECT_HELPER, redirectHelper);
View Full Code Here

    Assert.notNull(actionContext);
    Assert.notNull(actionName);

    HttpServletRequest request = actionContext.getRequest();
    RedirectHelper helper = (RedirectHelper) request.getAttribute(InfrastructureKeys.REDIRECT_HELPER);

    Map<String, String> requestParameters = null;

    if (helper != null)
    {
      requestParameters = helper.getRequestParameters();
      request.getSession().setAttribute(InfrastructureKeys.REDIRECT_PARAMETERS, helper.getSessionParameters());
    }

    String url = getRedirectURL(actionName, requestParameters);

    ActionForward actionForward = new ActionForward(url);
View Full Code Here

TOP

Related Classes of org.strecks.web.RedirectHelper

Copyright © 2018 www.massapicom. 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.