class VelocityAutotagRuntime extends Directive implements AutotagRuntime<Request> {

    @Override
    public Request createRequest() {
        ViewContext viewContext = (ViewContext) context.getInternalUserContext();
        HttpServletRequest request = viewContext.getRequest();
        HttpServletResponse response = viewContext.getResponse();
        ServletContext servletContext = viewContext.getServletContext();
        return VelocityRequest.createVelocityRequest(ServletUtil.getApplicationContext(servletContext),
                                                     request,
                                                     response,
                                                     context,
                                                     writer);
    }

}