Currently I am building an application on android to run on tomcat apache and mysql as backend. I have followed some J2me tut to follow the concept but I am struct at the point where I create HttpURLConnection. Here is the code snippet I m writing.
Using java Syntax Highlighting
- private void invokeServlet(URL url) {
- // TODO Auto-generated method stub
- final HttpURLConnection hc =null;
- hc = new HttpURLConnection(url); // Here it doesnt allow me to call constructor of HttpURLConnection
- InputStream is = null;
- OutputStream os = null;
- StringBuffer b = new StringBuffer();
- try {
- hc.connect();
- }catch(Exception e) {
- e.printStackTrace();
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
I will appreciate ur help/suggestions


