简体   繁体   English

如何从Google App Engine(Java)将图像检索到JSP中

[英]How to retrieve image into the jsp from the google app engine(java)

I am looking for retreiving the image into the jsp. 我正在寻找将图像导入到jsp中。

I found this link . 我找到了此链接

But in this i am not able to retreive the image into my desired jsp, it is just displaying the image 但是在这种情况下,我无法将图像还原为所需的jsp,它只是显示图像

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.

相关问题 如何从URL检索图像并将其存储为Java中的Blob(Google App引擎) - How to I retrieve an image from a URL and store it as a Blob in Java (google app engine) 如何从Google App Engine数据存储区(Java)正确检索int? - How to correctly retrieve int from a Google App Engine datastore (Java)? 通过Google App Engine(JAVA)将文件(图像或视频)从JSP上传到Google云存储 - Upload File (image or video) from JSP to google cloud storage via Google app engine(JAVA) Google App Engine(Java)-从web.xml重定向到jsp - Google App Engine (Java) - Redirection to jsp from web.xml 如何使用Java JSP从Routing-URL Google App Engine获取参数 - How to get parameter from routing-url Google App Engine using Java JSP 如何使用谷歌应用程序引擎从数据存储区检索信息,并使用Java在Android应用程序的列表视图中显示它? - how to retrieve info from datastore using google app engine and display it in a list view on an android app using java? Google App Engine Java Servlet读取JSP - Google App Engine Java servlet read JSP 如何在谷歌应用引擎中将操作中的值传递给 jsp? - how to pass a value from action to jsp in google app engine? 如何使用Java在Google App Engine中检索当前服务器端日期时间 - How to retrieve the current server side datetime in Google App Engine with Java Google App Engine JSP - Google App Engine JSP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM