Package com.ramforth.webserver.http.templates

Examples of com.ramforth.webserver.http.templates.IWebTemplate


    public boolean processHttpContext(IHttpContext httpContext) {
        if (isGetOrHeadOrPostMethod(httpContext.getRequest())) {
            if (resourceExists(httpContext.getRequest().getUri().getPath())) {
                HttpDynamicTemplateResource templateResource = getTemplateResource(httpContext.getRequest().getUri().getPath());

                IWebTemplate template = fileInstantiator.instantiate(templateResource);
                template.setContext(httpContext);
                template.load();

                switch (httpContext.getRequest().getMethod()) {
                    case GET:
                    case HEAD:
                        template.get();
                        break;
                    case POST:
                        template.post();
                        break;
                }

                if (template instanceof WebFileTemplate) {
                    switch (httpContext.getRequest().getMethod()) {
View Full Code Here

TOP

Related Classes of com.ramforth.webserver.http.templates.IWebTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.