Spring Framework ResourceHttpRequestHandler - 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 ResourceHttpRequestHandler class.

This code example shows how to use the following methods:setLocations, setResourceResolvers, setResourceTransformers, setCacheSeconds
 
	/** 
	 * Returns a {@link ResourceHttpRequestHandler} instance. 
	 */ 
	protected ResourceHttpRequestHandler getRequestHandler() {
		ResourceHttpRequestHandler handler = new ResourceHttpRequestHandler();
		if (this.resourceChainRegistration != null) {
			handler.setResourceResolvers(this.resourceChainRegistration.getResourceResolvers());
			handler.setResourceTransformers(this.resourceChainRegistration.getResourceTransformers());
		} 
		handler.setLocations(this.locations);
		if (this.cachePeriod != null) {
			handler.setCacheSeconds(this.cachePeriod);
		} 
		return handler;
	} 
 
} 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
import java.util.Map; 
 
/** 
 * @author Jeff Fischer 
 */ 
public class BroadleafGWTModuleURLMappingResourceHttpRequestHandler extends ResourceHttpRequestHandler { 
 
    @Override 
    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 
        Map<String, String> urlPatternDispatchMap = (Map<String, String>) getApplicationContext().getBean("blResourceUrlPatternRequestDispatchMap"); 
        for (Map.Entry<String, String> entry : urlPatternDispatchMap.entrySet()) { 
            RequestMatcher matcher = new AntPathRequestMatcher(entry.getKey()); 
            if (matcher.matches(request)){ 
                request.getRequestDispatcher(entry.getValue()).forward(request, response); 
                return; 
            } 
        } 
        super.handleRequest(request, response); 
    } 
 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework ResourceHttpRequestHandler Methods: