检索和使用servlet从MySQL在Android上显示图像 [英] retrieve and display image on Android from MySQL using servlets

查看:132
本文介绍了检索和使用servlet从MySQL在Android上显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能会发现这个问题,常见的绕来绕去了相当长的时间。这种情况的出现,我试图开发Android应用程序,它存储在MySQL数据库的动态数据的工作。在Android形式的用户的一个选择学生的卷数目及类别。当点击显示详细信息按钮,我想调用一个Servlet,将采取DB这两个变量和消防SQL查询,以获得学生的形象。
我需要这个形象我的Andr​​oid屏幕上显示。
这将是巨大的帮助,如果任何人都可以帮助从Servlet中的图像发送并显示在Android的部分。

You may find this question common and going around for quite a long time. The scenario is, I'm trying to develop Android app which works on dynamic data stored in MySQL database. On one of the android form user selects roll number and class of the student. When Show Details button is clicked, I want to call a Servlet which will take these two variables and fire SQL query on DB to retrieve image of the student. I need this image to be displayed on my android screen. It will be great help if anyone can help in with the image sending from Servlet and displaying on android part.

应用程序 - >的Servlet - > DB(检索图像) - > Servlet的--App(显示图像)

App --> Servlet --> DB (retrieve image) -->Servlet --App(Display Image)

请提供样品code,这将是非常有益的。先谢谢了。

Please provide sample code, it will be very helpful. Thanks in advance.

推荐答案

我发现下面的资源在谷歌搜索。我查阅了code(不运行)一个我认为你有必要为部分解决您的问题。

I found the following resources searching on google. I have reviewed the code (not running) an I think that you have the necessary pieces for solve your problem


  1. 如何从数据库(服务器端)的BLOB:的http:// www.jguru.com/faq/view.jsp?EID=1325

  2. 如何在Servlet(服务器端)显示图像:的http:/ /www.exampledepot.com/egs/javax.servlet/GetImage.html

  3. 如何从远程服务器(Android客户端)加载图象: http://en.androidwiki.com /维基/ Loading_images_from_a_remote_server

  1. How to get a BLOB from database (Server Side): http://www.jguru.com/faq/view.jsp?EID=1325
  2. How to display a image in a Servlet (Server Side): http://www.exampledepot.com/egs/javax.servlet/GetImage.html
  3. How to load images from a remote server (Android Client): http://en.androidwiki.com/wiki/Loading_images_from_a_remote_server

谷歌是一个强大的工具;)

Google is a powerful tool ;)

这篇关于检索和使用servlet从MySQL在Android上显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆