Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in receiving data in servlet from android client?

 
seraj ela
Greenhorn
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is null? Is this an an Android problem, an HTTP or servlet problem, or a JDBC problem?
 
seraj ela
Greenhorn
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
connection is working fine..JDBC also fine.I think it is a servlet problem.Client returns the value before passing.
 
Tim Moores
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tried to print the data. but still returns null. i don't know where the problem was.
 
Tim Moores
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Tim Moores
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:What returns null?

Posting just the code explains nothing.
 
seraj ela
Greenhorn
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL is not initialized..
it works by adding URL = urls[0];
in line 36 in client coding.
 
Tim Moores
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So all is good now?
 
Moises Kline
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All is good now I think .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic