Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pl.matisoft.soy.global.runtime.resolvers;
 
 
 import java.util.Map;

Created with IntelliJ IDEA. User: mati Date: 01/11/2013 Time: 16:36
public class RequestHeadersDataResolver implements RuntimeDataResolver {
    private String prefix = "_request.header.";
    @Override
    public void resolveData(final HttpServletRequest requestfinal HttpServletResponse responseMap<String, ? extends Objectmodelfinal SoyMapData root) {
        for (final Enumeration e = request.getHeaderNames(); e.hasMoreElements();) {
            final String headerName = (Stringe.nextElement();
            final String requestHeader = request.getHeader(headerName);
            if (requestHeader != null) {
                root.put( + headerNamerequestHeader);
            }
        }
    }
    public void setPrefix(String prefix) {
        this. = prefix;
    }
    public String getPrefix() {
        return ;
    }
New to GrepCode? Check out our FAQ X