Package org.impalaframework.web.servlet.wrapper

Examples of org.impalaframework.web.servlet.wrapper.RequestModuleMapping


        expectNotForwardOrInclude();
        expect(request.getContextPath()).andReturn("/cp");
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper, new RequestModuleMapping("/sp", "module", null, "/unexpectedServletPath"), applicationId);
        assertEquals("/unexpectedServletPath", wrapper.getServletPath());
       
        verify(request, servletContext);
    }
View Full Code Here


       
        expect(servletContext.getRealPath("/extra/path/info")).andReturn("/realpath");
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper, new RequestModuleMapping("/sp", "module", null, "/servletPath"), applicationId);
        assertEquals("/realpath", wrapper.getPathTranslated());
       
        verify(request, servletContext);
    }
View Full Code Here

        expect(request.getContextPath()).andReturn("/cp");
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper,
                new RequestModuleMapping("/sp-path", "module", null, "/sp"), applicationId);
        assertEquals("/myuri", wrapper.getPathInfo("/cp/sp/myuri"));
       
        verify(request, servletContext);
    }
View Full Code Here

        expect(request.getContextPath()).andReturn("/cp").times(2);
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper,
                new RequestModuleMapping("/sp-path", "module", null, "/nonmatching"), applicationId);
        assertEquals("/sp/myuri", wrapper.getPathInfo("/cp/sp/myuri"));
       
        verify(request, servletContext);
    }
View Full Code Here

        expect(request.getContextPath()).andReturn("/nonmatching").times(2);
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper,
                new RequestModuleMapping("/sp-path", "module", null, "/nonmatching"), applicationId);
        assertEquals("/cp/sp/myuri", wrapper.getPathInfo("/cp/sp/myuri"));
       
        verify(request, servletContext);
    }
View Full Code Here

        expectNotForwardOrInclude();
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper,
                new RequestModuleMapping("/sp-path", "module", null, "/sp"), applicationId);
        assertEquals("/myuri", wrapper.getPathInfo());
       
        verify(request, servletContext);
    }
View Full Code Here

        expect(request.getPathInfo()).andReturn("/pathinfo");
       
        replay(request, servletContext);
       
        MappedHttpServletRequest wrapper = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper,
                new RequestModuleMapping("/sp-path", "module", null, null), applicationId);
        assertEquals("/pathinfo", wrapper.getPathInfo());
       
        verify(request, servletContext);
    }
View Full Code Here

    private WebAttributeQualifier webAttributeQualifier;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        moduleMapping = new RequestModuleMapping("/myModule", "myModule", null, null);
        applicationId = "applicationId";
       
        servletContext = EasyMock.createMock(ServletContext.class);
        webAttributeQualifier = EasyMock.createMock(WebAttributeQualifier.class);
    }
View Full Code Here

        springRuntimeModule = createMock(SpringRuntimeModule.class);
        applicationId = "applicationId";
        final PartitionedHttpSessionWrapper httpSessionWrapper = new PartitionedHttpSessionWrapper();
        httpSessionWrapper.setServletContext(servletContext);
        httpSessionWrapper.setEnableModuleSessionProtection(true);
        wrapperRequest = new MappedHttpServletRequest(servletContext, request, httpSessionWrapper, new RequestModuleMapping("/mymodule", "mymodule", null, null), applicationId );
       
        applicationManager = TestApplicationManager.newApplicationManager(null, moduleStateHolder, null);
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.web.servlet.wrapper.RequestModuleMapping

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.