|
|
Mozy Online Backup: 2GB Free. Automatic. Secure.
Subject: m-world.com / mobile portal / J2ME categorization-links needed - msg#00188
List: java.sun.kvm
Hi All,
I am starting to a new portal: http://www.m-world.com/ .
I added J2ME to main categories and added "Emulators - SDKs" as subcategory.
I tried to complete the Emulators - SDKs category but I am sure you will
have suggestions.
First of all I need suggestions to categorize the J2ME category and links
that you think I should add.
You can add links directly from http://www.m-world.com/ or you can mail me
directly.
Any feedback is appreciated.
Thanks,
Baris Efe
http://www.langtolang.com
===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
sending/receiving bytes streams
Hi,
I'm learning how to send a stream (array) of bytes from a phone
(emulator) to a servlet (I aim to know the way of sending images).
My servlet writes the following response to MIDlet's request:
you tell me: ,0
hits: 32
I mean, the servlet gets the request but no data is available at the
InputStream. ¿Is this the way to send data to a servlet?
MIDlet side:
HttpConnection hc = null;
OutputStream out = null;
int num_msg;
// Some data to send. I use a String just to try
String msg = "msg number " + ++num_msg;
hc = (HttpConnection)Connector.open(url);
hc.setRequestMethod(HttpConnection.POST);
out = hc.openOutputStream();
out.write(msg.getBytes());
out.flush();
.... code for reading servlet's response (works fine).
Servlet side :
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, java.io.IOException
{
ServletInputStream is = req.getInputStream();
int size=0;
size= is.available();
byte[] data = new byte[size];
is.read(data);
String msg = new String(data);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println("you tell me: " + msg + "," + size);
pw.println("hits: " + ++mCount);
}
TIA
Alberto Álvarez Besada
Tlf.: +34 914002155
e-mail.: aalvarb1@xxxxxxxxxxxx
===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".
Next Message by Date:
click to view message preview
Re: sending/receiving bytes streams
try to add following properties after setRequstMethod - espcially
Content-Type may help - it may not be the right content type for sending
images, but at least you should get some data.
c.setRequestProperty("If-Modified-Since",
"29 Oct 1999 19:43:31 GMT");
c.setRequestProperty("User-Agent",
"Profile/MIDP-1.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Type", "text/html");
c.setRequestProperty("Content-Language", "en-US"); //
regards Hardy
On Thursday 23 October 2003 11:39 am, you wrote:
> Hi,
> I'm learning how to send a stream (array) of bytes from a phone
> (emulator) to a servlet (I aim to know the way of sending images).
>
> My servlet writes the following response to MIDlet's request:
>
> you tell me: ,0
> hits: 32
>
> I mean, the servlet gets the request but no data is available at
> the InputStream. ¿Is this the way to send data to a servlet?
>
> MIDlet side:
>
> HttpConnection hc = null;
> OutputStream out = null;
> int num_msg;
>
> // Some data to send. I use a String just to try
> String msg = "msg number " + ++num_msg;
>
> hc = (HttpConnection)Connector.open(url);
> hc.setRequestMethod(HttpConnection.POST);
>
> out = hc.openOutputStream();
> out.write(msg.getBytes());
>
> out.flush();
>
> .... code for reading servlet's response (works fine).
>
>
> Servlet side :
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
> ServletException, java.io.IOException {
> ServletInputStream is = req.getInputStream();
> int size=0;
> size= is.available();
>
> byte[] data = new byte[size];
> is.read(data);
>
>
> String msg = new String(data);
> resp.setContentType("text/plain");
> PrintWriter pw = resp.getWriter();
> pw.println("you tell me: " + msg + "," + size);
> pw.println("hits: " + ++mCount);
> }
>
>
> TIA
>
> Alberto Álvarez Besada
>
> Tlf.: +34 914002155
> e-mail.: aalvarb1@xxxxxxxxxxxx
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@xxxxxxxxxxxx and include in the body of the message "help".
--
Hardy Henneberg
Henneberg Consult ApS
Grønnevej 44
2830 Virum
Danmark
tel: (45) 30704565
http://www.hhenne.dk
===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".
Previous Message by Thread:
click to view message preview
sending/receiving bytes streams
Hi,
I'm learning how to send a stream (array) of bytes from a phone
(emulator) to a servlet (I aim to know the way of sending images).
My servlet writes the following response to MIDlet's request:
you tell me: ,0
hits: 32
I mean, the servlet gets the request but no data is available at the
InputStream. ¿Is this the way to send data to a servlet?
MIDlet side:
HttpConnection hc = null;
OutputStream out = null;
int num_msg;
// Some data to send. I use a String just to try
String msg = "msg number " + ++num_msg;
hc = (HttpConnection)Connector.open(url);
hc.setRequestMethod(HttpConnection.POST);
out = hc.openOutputStream();
out.write(msg.getBytes());
out.flush();
.... code for reading servlet's response (works fine).
Servlet side :
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, java.io.IOException
{
ServletInputStream is = req.getInputStream();
int size=0;
size= is.available();
byte[] data = new byte[size];
is.read(data);
String msg = new String(data);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println("you tell me: " + msg + "," + size);
pw.println("hits: " + ++mCount);
}
TIA
Alberto Álvarez Besada
Tlf.: +34 914002155
e-mail.: aalvarb1@xxxxxxxxxxxx
===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".
Next Message by Thread:
click to view message preview
Re: sending/receiving bytes streams
try to add following properties after setRequstMethod - espcially
Content-Type may help - it may not be the right content type for sending
images, but at least you should get some data.
c.setRequestProperty("If-Modified-Since",
"29 Oct 1999 19:43:31 GMT");
c.setRequestProperty("User-Agent",
"Profile/MIDP-1.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Type", "text/html");
c.setRequestProperty("Content-Language", "en-US"); //
regards Hardy
On Thursday 23 October 2003 11:39 am, you wrote:
> Hi,
> I'm learning how to send a stream (array) of bytes from a phone
> (emulator) to a servlet (I aim to know the way of sending images).
>
> My servlet writes the following response to MIDlet's request:
>
> you tell me: ,0
> hits: 32
>
> I mean, the servlet gets the request but no data is available at
> the InputStream. ¿Is this the way to send data to a servlet?
>
> MIDlet side:
>
> HttpConnection hc = null;
> OutputStream out = null;
> int num_msg;
>
> // Some data to send. I use a String just to try
> String msg = "msg number " + ++num_msg;
>
> hc = (HttpConnection)Connector.open(url);
> hc.setRequestMethod(HttpConnection.POST);
>
> out = hc.openOutputStream();
> out.write(msg.getBytes());
>
> out.flush();
>
> .... code for reading servlet's response (works fine).
>
>
> Servlet side :
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
> ServletException, java.io.IOException {
> ServletInputStream is = req.getInputStream();
> int size=0;
> size= is.available();
>
> byte[] data = new byte[size];
> is.read(data);
>
>
> String msg = new String(data);
> resp.setContentType("text/plain");
> PrintWriter pw = resp.getWriter();
> pw.println("you tell me: " + msg + "," + size);
> pw.println("hits: " + ++mCount);
> }
>
>
> TIA
>
> Alberto Álvarez Besada
>
> Tlf.: +34 914002155
> e-mail.: aalvarb1@xxxxxxxxxxxx
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@xxxxxxxxxxxx and include in the body of the message "help".
--
Hardy Henneberg
Henneberg Consult ApS
Grønnevej 44
2830 Virum
Danmark
tel: (45) 30704565
http://www.hhenne.dk
===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".
|
|