How to get a response from servlet via ajax?

Servlet authentication question?

  • My site prompts the user for a username and password with a simple HTML form. The HTML form post the username and password to a servlet I have. The servlet verifies the username and password by querying the database where username and the MD5 of the password match. If it returns a row, then the servlet redirects the user to a control panel. Otherwise, the servlet sends the error to the login page. The control panel consist of various possible AJAX calls to servlets that manipulate things in the MySQL database. My Question: Is there a way to store the username and password in a way where other servlets have this information without having to tell them (post/get) and validate the information every time?

  • Answer:

    Sorry, wish I could help you with your problem. Have a happy holiday though! :)

Bob at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

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.