• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Problem in receiving data in servlet from android client?

 
Greenhorn
Posts: 22
Android MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 7493
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7493
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7493
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Tim Moores
Bartender
Posts: 7493
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7493
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So all is good now?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All is good now I think .
 
reply
    Bookmark Topic Watch Topic
  • New Topic