Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Regarding JSP programing (https://www.askmehelpdesk.com/showthread.php?t=22664)

  • Mar 12, 2006, 06:24 AM
    [email protected]
    Regarding JSP programing
    Sir,I have written one program in jsp for userlogin and password checking.It makes msaccess connectivity.
    It also extracts the data.But what ever the in the database,it is extracting.
    But I am going to give the username and password from outside,it should give username and password is not valid.
    But I have tried,it's not working.So,please give me one example of that.
    Then I can proceed further in my project.
    Thanks.
    Rashmi Rekha Panigrahi
  • Mar 13, 2006, 03:51 AM
    LTheobald
    I'm not sure I get what you are trying to achieve. Am I right in thinking you want the user to log in using their username and password and then use that to connect to the database and retrieve some data?

    If so, the way you would probably do it is that on the page that processes the login, use request.getParameter() to retrieve the username and password from the field and append these to the URL you use to connect to the database. If you look on this page, under the "Making A Connection" section is a area showing you how to supply the username and password to connect to the database.

    One note though - I wouldn't take this approach. It would be a better idea to have the application accessing the database using the same username/password for all users. This user account should also have the minimum of privileges (e.g. SELECT, INSERT etc.). Having a database login for each of the systems user is hard to maintain and I don't think it would be that secure either.

  • All times are GMT -7. The time now is 04:04 AM.