FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NetBeans Java ME Custom Component: Login Screen

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
fardy



Joined: 29 Oct 2008
Posts: 3

PostPosted: Tue Jan 06, 2009 9:00 am    Post subject: NetBeans Java ME Custom Component: Login Screen Reply with quote

Hi..

from the login screen code provided, there is some questions i would like to ask..

1).
//Take action based on login value
if (login) {
getAlertSuccess().setString("Login Succesfull");
} else {
getAlertSuccess().setString("Wrong Username or Password");
}
login = false;

Why when i have tried to change the getAlertSuccess for wrong username or password to
getAlertFailure, the midlet could not redirect to the target form?

2)
if (hc.getResponseCode() == HttpConnection.HTTP_OK) {
login = true;
}

Does this mean that if the connection to the servlet is ok, then return HTTP_Ok?How does
it validates the user?

Thanks..
i'm a newbie here..

----
Submitted via the contact form at: http://www.netbeans.info/appl2//index.php
Referer page: http://www.netbeans.org/kb/60/mobility/loginscreen.html
Back to top
View user's profile Send private message
peter_budo



Joined: 03 Oct 2008
Posts: 27

PostPosted: Tue Jan 06, 2009 8:17 pm    Post subject: Reply with quote

Not sure what you want from question one, or what you been trying to do. If you can elaborate on it we will try to help out.

For the second question, you need to download the server side example LoginScreenServletExample.zip and run it on your local installation of Tomcat. From this example you will see how the request is received, processed and relevant respond send back
Back to top
View user's profile Send private message
Richard.LeMesurier@gmail.
Posted via mailing list.





PostPosted: Thu Jan 15, 2009 9:31 am    Post subject: NetBeans Java ME Custom Component: Login Screen Reply with quote

Hi,

Nice example, thanks!

Unfortunately, you left out the part that calls the function "login()" - which I think
goes into the task of the waitScreen (at least it works after I put it there).

I'm finding this mobile learning path really handy - thanks for them!

Best Regards,
Richard Le Mesurier
Cape Town

----
Submitted via the contact form at: http://www.netbeans.info/appl2//index.php
Referer page: http://www.netbeans.org/kb/60/mobility/loginscreen.html
Back to top
jerryjho@yahoo.com
Posted via mailing list.





PostPosted: Mon Jan 19, 2009 5:19 am    Post subject: NetBeans Java ME Custom Component: Login Screen Reply with quote

Hello,

I am trying out this sample app according to the instructions as follows:

Creating the FileBrowserExample Project

1. Choose File New Project (Ctrl-Shift-N). Under Categories, select Mobile. Under
Projects, select MIDP Application and click Next.

-> No such option "Mobile" or "MIDP Application" in my IDE 6.5. Please help. Other samples
have similar problems

----
Submitted via the contact form at: http://www.netbeans.info/appl2//index.php
Referer page: http://www.netbeans.org/kb/60/mobility/loginscreen.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB