wood burning stoves 2.0*
The moose likes Android and the fly likes Problem in receiving data in servlet from android client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Problem in receiving data in servlet from android client?" Watch "Problem in receiving data in servlet from android client?" New topic
Author

Problem in receiving data in servlet from android client?

seraj ela
Greenhorn

Joined: Apr 28, 2012
Posts: 22

am developing a android application which need to exchange data with mysql database via local server.
In this coding when tried to pass the data through sql query it shows null.


servlet coding



Android Coding

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What is null? Is this an an Android problem, an HTTP or servlet problem, or a JDBC problem?
seraj ela
Greenhorn

Joined: Apr 28, 2012
Posts: 22

connection is working fine..JDBC also fine.I think it is a servlet problem.Client returns the value before passing.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
So at which spot in the code is everything still OK, and where does it start to go wrong? What have you done for debugging so far?
seraj ela
Greenhorn

Joined: Apr 28, 2012
Posts: 22

tried to print the data. but still returns null. i don't know where the problem was.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What returns null?

Also:
So at which spot in the code is everything still OK, and where does it start to go wrong? What have you done for debugging so far?
seraj ela
Greenhorn

Joined: Apr 28, 2012
Posts: 22

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Tim Moores wrote:What returns null?

Posting just the code explains nothing.
seraj ela
Greenhorn

Joined: Apr 28, 2012
Posts: 22

URL is not initialized..
it works by adding URL = urls[0];
in line 36 in client coding.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
So all is good now?
Moises Kline
Greenhorn

Joined: Jun 08, 2012
Posts: 3
All is good now I think .
 
wood burning stoves
 
subject: Problem in receiving data in servlet from android client?
 
Similar Threads
Android and JSP
Post the data to Server
HttpClient issue on Https Connection (multiple post)
Application nor run in the background
Client Android JSON--- Server side PhP .....error..!!