Package com.github.dandelion.core.asset

Examples of com.github.dandelion.core.asset.AssetType


    Context context = (Context) request.getAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE);
    HttpHeadersConfigurer httpHeadersConfigurer = new HttpHeadersConfigurer(context);
   
    // Get the asset content thanks to the cache key
    String assetKey = context.getCacheManager().getCacheKeyFromRequest(request);
    AssetType assetType = AssetType.typeOfAsset(assetKey);
   
    // Configure response headers
    httpHeadersConfigurer.configureResponseHeaders(response, assetType.getContentType());
   
    // Send the asset's content
    PrintWriter writer = response.getWriter();
    writer.write(context.getCacheManager().getContent(assetKey));
   
View Full Code Here

TOP

Related Classes of com.github.dandelion.core.asset.AssetType

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.