[英]How to retrieve image into the jsp from the google app engine(java)
I suggest you to serve Image from Blobstore as an Image Service, It will give your image better performance, sizes etc. 我建议您将Blobstore中的图像作为图像服务来提供,它将为您的图像提供更好的性能,尺寸等。
See my Code Below. 请参阅下面的代码。
ImagesService services = ImagesServiceFactory.getImagesService();
ServingUrlOptions serve = ServingUrlOptions.Builder.withBlobKey(blobKey); // Blobkey of the image uploaded to BlobStore.
String url = services.getServingUrl(serve);
You will get the URL for the image which you can easily put in the Image tag of HTML. 您将获得图像的URL,可以将其轻松放入HTML的Image标签中。
<img src="url" />
More you can learn about image service of AppEngine from here. 您可以从这里进一步了解AppEngine的图像服务。 GAE Image Services GAE影像服务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.