Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Need to send Objects from over HTTP to a servlet using standard J2ME, MIDP 2.0

Posted on 2004-10-28
Medium Priority
Last Modified: 2008-02-26
I want to communicate with a servlet or JSP page, from J2ME. I want to open a connection and send Objects to servlets.

The problem is that I know there is ObjectStreams in J2ME to send and retireve data.
So one way is to change the object to a string manually and send the data. Other is some automated way..

Is there any automated way like the way ObjectStreams work..

Either convert the objects to bytes and send them, and reconstruct them on the other end..

Thanx for the help in advance
Question by:armoghan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 18

Author Comment

ID: 12441631
soory about the mistake in this line

>>>>The problem is that I know there is **** NO**** ObjectStreams in J2ME to send and retireve objects.
LVL 18

Author Comment

ID: 12441646
One way could be to convert the objects to XML and then send them and convert them back on otherside..
Is there any API in J2ME to do so.. may be using KXML or anyother XML parser..

LVL 13

Expert Comment

ID: 12442110
If u worked with struts, their is a simpler way make ur J2ME send the object attributes as url parameters to a Struts action, that action should have a registered Struts form and make the url parameters names the same as the Form fields names, on the struts u will automatically recieve it as the specified Form object
LVL 18

Author Comment

ID: 12442131
No i do not want to send object attributes.

I want to send the whole object. as it may be much bigger. May have anything upto an image/arraylists etc

I have read that article which shows how to concatinate the parameters in URL and send it to struts which will make a work itself.

Accepted Solution

modulo earned 0 total points
ID: 12574291
Closed, 300 points refunded.

Community Support Moderator
Experts Exchange

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe how to setup a Cisco WLC 5508 to work with Apple's Bonjour protocol across VLANs.  I will also discuss using screen mirroring and Airplay on an AppleTV v3.  This article covers the wireless network only and requires m…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question