add text in http request string url
ok i made a midlet through which i can connect to server pages and get soem information as response. For example i made a midlet through which i acced url: http://example.com/?u=nepal&t=1 Now i want to change the value of u as per users input. I made a text field through which users can input desired name in u=***** Now how can i add user inputted string to the url and featch it? i tried to add the textfield directly to link it didnot worked. i t开发者_如何学Pythonried to pass s=textfield.getString(); and made url: example.com/?u="+s+"&t=1 But after i did it jar file donot run and says null exception error. Please help how can i.. change the value of u as per users input through the app. Thanks
NullPointerException means something is null - probably your textfield. Check it. It should work, if textfield isn't null.
精彩评论