?
Solved

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

Posted on 2004-10-28
6
Medium Priority
?
238 Views
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
0
Comment
Question by:armoghan
  • 3
5 Comments
 
LVL 18

Author Comment

by:armoghan
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.
0
 
LVL 18

Author Comment

by:armoghan
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..

0
 
LVL 13

Expert Comment

by:petmagdy
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
0
 
LVL 18

Author Comment

by:armoghan
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.
0
 

Accepted Solution

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

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

Question has a verified solution.

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

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.
Using in-flight Wi-Fi when you travel? Business travelers beware! In-flight Wi-Fi networks could rip the door right off your digital privacy portal. That’s no joke either, as it might also provide a convenient entrance for bad threat actors.
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…
Suggested Courses

588 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