gpt4 book ai didi

java - 如何从谷歌应用引擎(java)将图像检索到jsp中

转载 作者:行者123 更新时间:2023-12-01 14:57:59 25 4
gpt4 key购买 nike

我正在寻找将图像检索到 jsp 中。

我找到了this link .

但是在这里我无法将图像检索到我想要的jsp中,它只是显示图像

最佳答案

我建议您将 Blobstore 中的图像作为图像服务提供,这将为您的图像提供更好的性能、尺寸等。

请参阅下面的代码。

ImagesService services = ImagesServiceFactory.getImagesService();
ServingUrlOptions serve = ServingUrlOptions.Builder.withBlobKey(blobKey); // Blobkey of the image uploaded to BlobStore.
String url = services.getServingUrl(serve);

您将获得图像的 URL,您可以轻松地将其放入 HTML 的 Image 标签中。

<img src="url" />

更多关于AppEngine的图像服务您可以从这里了解。 GAE Image Services

关于java - 如何从谷歌应用引擎(java)将图像检索到jsp中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14097913/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com