@@ -0,0 +1,2112 @@
+package jetbrick.template.web.servlet;%0A%0Aimport java.io.IOException;%0Aimport javax.servlet.*;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport jetbrick.template.*;%0Aimport jetbrick.template.web.JetWebContext;%0Aimport jetbrick.template.web.JetWebEngineManager;%0A%0A/**%0A * %3Cpre%3E%3Cxmp%3E%0A * %3Cfilter%3E%0A *      %3Cfilter-name%3Ejetbrick-template%3C/filter-name%3E%0A *      %3Cfilter-class%3Ejetbrick.template.web.servlet.JetTemplateFilter%3C/filter-class%3E%0A *      %3Cinit-param%3E%0A *          %3Cparam-name%3Econfig%3C/param-name%3E%0A *          %3Cparam-value%3E/WEB-INF/jetbrick-template.properties%3C/param-value%3E%0A *      %3C/init-param%3E%0A *  %3C/filter%3E%0A *  %3Cfilter-mapping%3E%0A *      %3Cfilter-name%3Ejetbrick-template%3C/filter-name%3E%0A *      %3Curl-pattern%3E*.jetx%3C/url-pattern%3E%0A *  %3C/filter-mapping%3E%0A *  %3C/xmp%3E%3C/pre%3E%0A */%0Apublic class JetTemplateFilter implements Filter %7B%0A    private static JetEngine engine;%0A%0A    @Override%0A    public void init(FilterConfig fc) throws ServletException %7B%0A        String configFile = fc.getInitParameter(%22config%22);%0A%0A        JetWebEngineManager.setConfigFile(configFile);%0A        JetWebEngineManager.setServletContext(fc.getServletContext());%0A        engine = JetWebEngineManager.getJetEngine();%0A    %7D%0A%0A    @Override%0A    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException %7B%0A        HttpServletRequest req = (HttpServletRequest) request;%0A        HttpServletResponse resp = (HttpServletResponse) response;%0A        JetContext context = new JetWebContext(req, resp);%0A%0A        String path = req.getPathInfo();%0A        if ((path == null) %7C%7C (path.length() == 0)) %7B%0A            path = req.getServletPath();%0A        %7D%0A        if (path.endsWith(%22/%22)) %7B%0A            path = path + %22/index.jetx%22;%0A        %7D%0A%0A        try %7B%0A            JetTemplate template = engine.getTemplate(path);%0A            template.render(context, resp.getOutputStream());%0A        %7D catch (ResourceNotFoundException e) %7B%0A            resp.sendError(404, %22Template not found: %22 + path);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void destroy() %7B%0A    %7D%0A%0A%7D%0A

Create JetTemplateFilter.java