Hi, you are adding the result to a header in the servlet which doesn't make sense. You need to write it to the response ideally with the right mime type see: http://www.oracle.com/technetwork/java/servlet-142430.html
I would also suggest starting with doGet as you can debug that in the browser and see that you get the right response. On the Codename One side you need to use a regular ConnectionRequest. MultipartRequest is for file upload which is something very different. Notice that the URL you gave is for your localhost and will not work on the device... Something like this should work, notice that you don't need to catch an exception as those are asynchronous: ConnectionRequest req = new ConnectionRequest( "http://127.0.0.1:7101/TestServlet-SerlvletTest-context-root/servlet1") { protected void readResponse(InputStream input) throws IOException { JSONParser p = new JSONParser(); Map<String, Object> parsedData = p.parseJSON(new InputStreamReader( input, "UTF-8")); ... do something with the JSON } protected void postResponse() { ... change the UI based on the results of readResponse } }; req.setPost(true); NetworkManager.getInstance().addToQueue(req); -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/9619fb03-ae57-4d74-be33-30723e32e15d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
