Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Saloon Keeper
Posts: 7626
177
  • 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
Saloon Keeper
Posts: 7626
177
  • 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
Saloon Keeper
Posts: 7626
177
  • 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
Saloon Keeper
Posts: 7626
177
  • 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
Saloon Keeper
Posts: 7626
177
  • 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