Spring Framework ServletWrappingPortletContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ServletWrappingPortletContext class.

This code example shows how to use the following methods:
 
	private ConfigurablePortletApplicationContext initApplicationContext(String scope) { 
		MockServletContext sc = new MockServletContext(); 
		GenericWebApplicationContext rac = new GenericWebApplicationContext(sc); 
		rac.refresh(); 
		PortletContext pc = new ServletWrappingPortletContext(sc); 
		StaticPortletApplicationContext ac = new StaticPortletApplicationContext(); 
		ac.setParent(rac); 
		ac.setPortletContext(pc); 
		GenericBeanDefinition bd = new GenericBeanDefinition(); 
		bd.setBeanClass(DerivedTestBean.class); 
		bd.setScope(scope); 
		ac.registerBeanDefinition(NAME, bd); 
		ac.refresh(); 
		return ac; 
	} 
 
	@Test 
	public void testRequestScope() { 
		WebApplicationContext ac = initApplicationContext(WebApplicationContext.SCOPE_REQUEST); 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java