Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pl.matisoft.soy.global.runtime.resolvers;
 
 
Created with IntelliJ IDEA. User: mati Date: 01/11/2013 Time: 18:13
    @Inject
    private ServletContext servletContext;
    private String prefix = "_servlet.context.";
    @Override
    public void resolveData(final HttpServletRequest requestfinal HttpServletResponse responsefinal Map<String, ? extends ObjectmodelSoyMapData root) {
        if (.getContextPath() != null) {
            root.put( + "contextPath".getContextPath());
        }
        root.put( + "minorVersion".getMinorVersion());
        root.put( + "majorVersion".getMajorVersion());
        if (.getServletContextName() != null) {
            root.put( + "servletContextName".getServletContextName());
        }
        if (.getServerInfo() != null) {
            root.put( + "serverInfo".getServerInfo());
        }
        for (final Enumeration<Stringe = .getInitParameterNames(); e.hasMoreElements();) {
            final String paramName = e.nextElement();
            final String paramValue = .getInitParameter(paramName);
            if (paramValue != null) {
                root.put( + "parameter." + paramNameparamValue);
            }
        }
    }
    @Override
    public void setServletContext(ServletContext servletContext) {
        this. = servletContext;
    }
    public String getPrefix() {
        return ;
    }
    public void setPrefix(String prefix) {
        this. = prefix;
    }
New to GrepCode? Check out our FAQ X