Package com.nhaycungbibi.controller

Source Code of com.nhaycungbibi.controller.ImageController

package com.nhaycungbibi.controller;

import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.blobstore.BlobKey;
import com.google.appengine.api.blobstore.BlobstoreService;
import com.google.appengine.api.blobstore.BlobstoreServiceFactory;

@SuppressWarnings("serial")
public class ImageController extends HttpServlet {
  private BlobstoreService blobstoreService = BlobstoreServiceFactory
      .getBlobstoreService();

  public void doGet(HttpServletRequest req, HttpServletResponse res)
      throws IOException {
    BlobKey blobKey = new BlobKey(req.getParameter("key"));
    blobstoreService.serve(blobKey, res);
  }
}
TOP

Related Classes of com.nhaycungbibi.controller.ImageController

TOP
Copyright © 2018 www.massapi.com. 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.