users@glassfish.java.net

Re: communication midlet - servlet

From: Sreeram Duvur <Sreeram.Duvur_at_Sun.COM>
Date: Sun, 20 Sep 2009 09:41:16 -0700

On Sep 20, 2009, at 8:36 AM, glassfish_at_javadesktop.org wrote:

> Hello!
>
> I'd like to create application in Java for mobile phone which can
> communicate with the user and based on this communication create
> little text file. I want to send this text file from mobile phone to
> server.
>
> Is it possible to do it with MIDlet sending data to servlet
> installed on server with GlassFish? I guess it is possible.
>

You can use Jersey on Glassfish server to act as a web service end
point for file uploads. Use HttpUrlConnection class in the midlet to
post to the upload web service.

Alternatively, if it is just plain text, you could also just post a
form url to a servlet.

I am not sure if HttpURLConnection class is available in CDC.

Sreeram

> Later I'd like to use some more sophisticated algorithms in my
> application which may require extensive floating point math and so
> on - this is why later I will need to change my application from
> CLDC-MIDlet to CDC.
>
> Is it possible to send data from Java ME CDC on mobile phone to
> servlet on GlassFish?
>
> Thanks very much for your help in advance
> Greetings :-)!
> [Message sent by forum member 'johnyjj2' (johnyjj2_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=364834
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>