This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Android and the fly likes Android form not working properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Android form not working properly" Watch "Android form not working properly" New topic
Author

Android form not working properly

Peter Dolinsky
Greenhorn

Joined: Mar 24, 2013
Posts: 2
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.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

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)?


Steve
Peter Dolinsky
Greenhorn

Joined: Mar 24, 2013
Posts: 2
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

Joined: Jan 28, 2003
Posts: 3934
    
  17

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Android form not working properly
 
Similar Threads
passing multiple values from one page to another
else loop not working
Using sessions for authentication
JSP <a href> tags breaks page functionality
Help needed in login page