Forums Register Login

Sending images to a midlet.

+Pie Number of slices to send: Send
Hello people,
What is the best way to send some binary data (images) to a J2me client? JSP's r no good for this, so one should use servlets, which makes it look more like a Controller and VIew at the same time. Do you send it using s helper function? what is the best architecture in the server side, in case you need to send images and text (like to a micro browser) .. link to images ?(too slow with network latency, first get the link.. then download the image..)??
Any help will be appreciated..
Thanks a lot.
+Pie Number of slices to send: Send
Come on guys, help me out :roll:
+Pie Number of slices to send: Send
r u kidding?
+Pie Number of slices to send: Send
Why selva? I don't understand, I am serious, just wanted to get some help/comments.
+Pie Number of slices to send: Send
because of question
1000 solutions depends on your needs. give more requirements specification. But first take a look on this article:
http://www-106.ibm.com/developerworks/java/library/j-j2me4/
JSP, servlets, php and so on... your choice.
+Pie Number of slices to send: Send
Thanks for the answer.. I already know about the article..
My neads.. Well just general architecture based on Servlets, and how to decouple the image scaling/sending from this controller servlet.
thanks
+Pie Number of slices to send: Send
Create a servlet. Map it on "/giveMeMyImage" and do all what you want incide the servlet body. Use JMF if you need image effects. Scaling can be performed without JMF.
This is not architecture, this is simple servlet mapping If you need more info on MVC just search google.
+Pie Number of slices to send: Send
in general... forget about MVC (it is just a words combination) . Here, (you know how to create a simple server application and web.xml file which configures your web-app)... so, some where in your web.xml:

I use RESIN as web app and ejb server. You can use tomcat (for ex.). Tomcat mapping will be a bit different (look on docs). So, now if you will make any http requests on your server "http://www.xxx.com/control/" which are ended with "/control/" they will be handled by your MainServlet. The servlet has some methods like doGet doPost and so on... Isert your code in doGet method (read docs why). This code should load, process and send image to the client (look for code in the article i have post). TO use the power of MVC you need "requests mapping manager". Take a look on apache.org. They provide something... I use my own which was wtitten 3y ago and works fine for me
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1371 times.
Similar Threads
About Applets....
Show the UML
How to paint jpg using applet in browser!!
Downloading png images to mobile
Any ideas for xmas gifts for a programmer?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:41:27.