How can I create accounts in java programming?
-
am supposed to create a program that lets people manage music accounts. For example there is a text that has songs, followed by artists, followed by categories. The user can modify, read and delete items in the array (songs, etc in the text) I need to have "accounts" on my java program. For example the java program will ask what is your name. I will say Bob and it will bring me to my music collection. How can I have several accounts in one program. If statements???? I am new to java. Can you summarize a plan for me or link me a specific tutorial?
-
Answer:
Generally this is done by storing a table of usernames and passwords (usually hashed) in a MySQL database. You could probably use a text file for a simple example program. The user goes to the index JSP page and enters a username and password into a form. The form is sent to another page (usually a Java Servlet) which looks up the username and checks the password. If the login is a failure the servlet forwards back to the index page with an error message. If the login was a success the servlet forwards to the appropriate page and probably sets a cookie as well as a session attribute.
Yahoo! Answers Visit the source
Other answers
Generally this is done by storing a table of usernames and passwords (usually hashed) in a MySQL database. You could probably use a text file for a simple example program. The user goes to the index JSP page and enters a username and password into a form. The form is sent to another page (usually a Java Servlet) which looks up the username and checks the password. If the login is a failure the servlet forwards back to the index page with an error message. If the login was a success the servlet forwards to the appropriate page and probably sets a cookie as well as a session attribute.
galt_57
Related Q & A:
- How can I create my own hosted svn server?Best solution by stackoverflow.com
- How can i create gift card in magento community edition?Best solution by Magento
- How can i create a mobile application server?Best solution by Stack Overflow
- How Can I Create an XML to Create a Menu?Best solution by Drupal Answers
- How can I get a career in programming?Best solution by cplus.about.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.