• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 7100
165
  • 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: 7100
165
  • 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: 7100
165
  • 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: 7100
165
  • 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: 7100
165
  • 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 .
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic