Click here to Skip to main content
15,891,951 members
Home / Discussions / Mobile
   

Mobile

 
Questionhow to detect usb mass storage device in Windows CE [modified] Pin
perumandla4-May-11 2:32
perumandla4-May-11 2:32 
QuestionStandard pay pal with PDA application Pin
S.Aijaz3-May-11 1:17
S.Aijaz3-May-11 1:17 
QuestionBegginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz1-May-11 20:38
S.Aijaz1-May-11 20:38 
AnswerRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
Richard MacCutchan1-May-11 23:23
mveRichard MacCutchan1-May-11 23:23 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz1-May-11 23:39
S.Aijaz1-May-11 23:39 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
Richard MacCutchan1-May-11 23:47
mveRichard MacCutchan1-May-11 23:47 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz2-May-11 0:30
S.Aijaz2-May-11 0:30 
Questionrereceive from Servlet to J2ME Using Sessoin Pin
williamroma30-Apr-11 13:48
williamroma30-Apr-11 13:48 
hi for all
<b>(SORRY FOR MY BAD ENGLISH)</b>
i am trying to rereceive a number from a Servlet
i send the request from J2ME using HttpConnection to a servlet , then a servlet make a session to count the number of times
i send the requests
and the servlet send back to me that number
but in HttpConnection i can send just one times terminated after that third states
so every time i send the request the number i received is 1
this is the code in J2ME

<pre>
HttpConnection hc = null;
DataInputStream in = null;
DataOutputStream out = null;
String UrlServer = "http://localhost:8080/DeleteWebApplication/RomaServlet";
StringBuffer sb = new StringBuffer();

private void sendGetContactsRequest() {
try {
UrlServer = "http://localhost:8080/Server2/SessionServlet";
sb = new StringBuffer();
hc = (HttpConnection) Connector.open(UrlServer, Connector.READ_WRITE);
hc.setRequestMethod(HttpConnection.POST);
out = hc.openDataOutputStream();
String getContacts = "getContacts";
byte[] getContactsBytes = getContacts.getBytes();
for (int i = 0; i &lt; getContactsBytes.length; i++) {
out.writeByte(getContactsBytes[i]);
}

in = hc.openDataInputStream();
long len = hc.getLength();
int ch;
if (len != -1) {
for (int i = 0; i &lt; len; i++) {
if ((ch = in.read()) != -1) {
sb.append((char) ch);
}
}

in.close();
hc.close();
out.flush();
out.close();
} else {
sb.append("ERRORR R ");
}
System.out.println(sb.toString());
} catch (IOException ex) {
ex.printStackTrace();
}
}
</pre>
don't care about all the code just about send and receive
this is the code in my servlet

<pre>
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("he totti asdf asdf asdf asdf ");
HttpSession session=request.getSession(false);
if(session==null){
session=request.getSession(true);
Integer times=new Integer(0);
session.setAttribute("count", times);
}
Integer times=(Integer) session.getAttribute("count");
times=new Integer(times.intValue()+1);
session.setAttribute("count", times);
response.getWriter().println("the number of times is "+times.intValue());
}
</pre>


i believe that a session is the best solution but i don't know how to use it

plz help me

ty very much
AnswerRe: rereceive from Servlet to J2ME Using Sessoin Pin
williamroma30-Apr-11 14:45
williamroma30-Apr-11 14:45 
QuestionSQL CE 2.0 cyrillic characters - urgent please Pin
Tyler4525-Apr-11 1:13
Tyler4525-Apr-11 1:13 
AnswerRe: SQL CE 2.0 cyrillic characters - urgent please Pin
Richard MacCutchan25-Apr-11 1:41
mveRichard MacCutchan25-Apr-11 1:41 
GeneralRe: SQL CE 2.0 cyrillic characters - urgent please Pin
Tyler4525-Apr-11 2:35
Tyler4525-Apr-11 2:35 
QuestionNeed help with my Java Android code Pin
mofuobi20-Apr-11 23:57
mofuobi20-Apr-11 23:57 
AnswerRe: Need help with my Java Android code [modified] Pin
Patrick Kalkman21-Apr-11 9:47
Patrick Kalkman21-Apr-11 9:47 
AnswerRe: Need help with my Java Android code Pin
All Time Programming21-Apr-11 21:13
All Time Programming21-Apr-11 21:13 
QuestionWin CE getch() and clrscr() Pin
baerten14-Apr-11 23:44
baerten14-Apr-11 23:44 
AnswerRe: Win CE getch() and clrscr() Pin
Paul Heil15-Apr-11 7:49
Paul Heil15-Apr-11 7:49 
QuestionCamera not working working on Motorola MC95 when accessing with C++ / ME 6.5 Pin
lichtbringer14-Apr-11 23:24
lichtbringer14-Apr-11 23:24 
AnswerRe: Camera not working working on Motorola MC95 when accessing with C++ / ME 6.5 Pin
joputongordo9-Dec-11 1:31
joputongordo9-Dec-11 1:31 
QuestionHow we make a read message into unread message in Blackberry Pin
zakirhussain4913-Apr-11 20:27
zakirhussain4913-Apr-11 20:27 
Jokez Pin
rtvscan13-Apr-11 3:21
rtvscan13-Apr-11 3:21 
QuestionAndroid ksoap2 stub generator giving errorneous stub Pin
shivdattam12-Apr-11 0:54
shivdattam12-Apr-11 0:54 
QuestionGetting video url to view on android phone Pin
Aljaz11111-Apr-11 2:01
Aljaz11111-Apr-11 2:01 
QuestionCustomized Mobile Firmware Pin
yaddenn6-Apr-11 17:16
yaddenn6-Apr-11 17:16 
QuestionWindows Mobile C# Pin
kmarine01205-Apr-11 11:23
kmarine01205-Apr-11 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.