public void loadResource(CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException, CmsException {

        res.setContentType(getMimeType(resource.getName(), cms.getRequestContext().getEncoding()));
        I_CmsResourceLoader loader = getLoader(resource);
        loader.load(cms, resource, req, res);
    }
public void loadResource ( CmsObject cms , CmsResource resource , HttpServletRequest req , HttpServletResponse res ) throws ServletException , IOException , CmsException { res . setContentType ( getMimeType ( resource . getName ( ) , cms . getRequestContext ( ) . getEncoding ( ) ) ) ; I_CmsResourceLoader loader = getLoader ( resource ) ; loader . load ( cms , resource , req , res ) ; }
Loads the requested resource and writes the contents to the response stream.<p>

@param req the current HTTP request
@param res the current HTTP response
@param cms the current OpenCms user context
@param resource the requested resource
@throws ServletException if something goes wrong
@throws IOException if something goes wrong
@throws CmsException if something goes wrong