I Have written a code (Socket Client) which asks for server and port name at the starting. connects to that web server makes the request waits & gets the response finally displays it...
When I entered valid server & port name I got this Exception: java.lang.SecurityException: Target port denied to untrusted applications at com.sun.midp.io.j2me.socket.Protocol.connect(+62) at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+52) at com.sun.midp.io.j2me.socket.Protocol.openPrim(+108) at javax.microedition.io.Connector.openPrim(+233) at javax.microedition.io.Connector.open(+15) at javax.microedition.io.Connector.open(+6) at SocketMIDlet.run(+88)
Why Am I getting this Exception? Is there any way to get around this?
hi girish i am also trying to get the response from the webserver by sending the request from the browser in j2me but i am not all getting any response from the webserver. my code is working in emulator and im able to get the response from the webserver.
im not all getting any exception or expected output in the mobile but the connection is getting established. can you tell me how your sending the request from your application to the server Thanks a lot