Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Android form not working properly

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i´m using 3 jsp pages to retrieve personal info of registered members: checklogin.jsp, this file is verifying, whether someone is registered, select.jsp, this file contains the select query and GSON.jsp, this file contains gson object with results from the previously mentioned select query. The login and password is sent from android application...My problem is that the output shows everywhere null.
This part of code (checklogin.jsp) records data from login form. (the username is stored to session)


This part of code is selecting info of this logged member and stores this info to sessions(select.jsp)


This part is displaying the info(gson.jsp):


This gson.jsp is showing null everywhere. I dont know where is the problem, because when i tried to login from jsp form(not from android), the gson.jsp shows me the info of logged person.

Can you help me?
Thanks.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sessions are usually tracked by cookies, does the Android device have cookies turned off? Are you properly encoding the URL to account for this (ref: http://docs.oracle.com/javaee/6/tutorial/doc/bnagm.html)?
 
Peter Dolinsky
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I changed the NetBeans project settings, but the output is same. Cookies..i´m connecting through application, not through browser. How can i delete cookies in application?
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure what NetBeans has to do with it: probably nothing. If you are using app code to connect to the server then you need to handle Cookies yourself. Android has the Apache HTTP Client built in which will make Handling the cookies and requests easier. You should read the documents on http://hc.apache.org/httpclient-3.x/ to learn how to use it.
 
My cellmate was this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic