This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How to send bytearray from Servlet to Midlet application?  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone!
I'm trying to send bytes from servlet to midlet so that i could turn that bytes back to image and display in midlet.
Below are my codes!

//For Servlet


//For Midlet


What should I do in above codes to get screencapture in midlet application? Thanking in advance....
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
You need to treat midlet as the WebService client and you can call the method in the midlet then like this


here dbss.DB(DataQuery, UsrNam, Pswrd,FilNam) is the method of the web service .java file.

regards
Lokesh
 
Archana Maharjan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Lokesh!
Is there any possible way to display that screencapture without using the database?
Is the way I've passed the bytearray into midlet application correct?
Is the way I'm getting the bytearray in midlet application through servlet correct?
And I want to draw that image in the canvas of the midlet.
I have ControlPCMidlet midlet application, LoginValidateThread where run thread invokes the invokeservlet.
Wht should I do?
 
lokesh jain
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Archana,
I have given you an example only, you can use the screen capture without use of Database things. To pass byteArray, you need to make the Midlet as client of the servlet. Yes, you can send byteArray from servlet to Midlet. You need to use Canvas class in midlet.
 
lokesh jain
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Here I would like to give you a link, which performs servlet to midlet communication. webpage

I think your doubt will be cleared.

regards
Lokesh
 
Archana Maharjan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Lokesh ji. It is solved now!
 
lokesh jain
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
That's good !! Can you tell me, how you did it. It will add to my knowledge base as well.


regards
Lokesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!