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

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
LVL 18
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

armoghanAuthor Commented:
soory about the mistake in this line

>>>>The problem is that I know there is **** NO**** ObjectStreams in J2ME to send and retireve objects.
armoghanAuthor Commented:
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..

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
armoghanAuthor Commented:
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.
Closed, 300 points refunded.

Community Support Moderator
Experts Exchange

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Wireless Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.