Results 1 to 1 of 1
  1. #1
    zabltn is offline Member
    Join Date
    Mar 2012
    Rep Power

    Default how to give database user id and password at runtime not through persistence.xml file

    Hello everybody,

    I built a mysql database application in netbeans and while i run the application it takes the database URL(user name and password) from a file called 'persistence.xml', i wished to give the username and password at run time so then i built a login screen which through that it connects to the database fine. Now the point is that still the username and password are taken from that file and how can i change the fixed username and password set in 'persistence.xml' file at run time, i searched a lot but i just found out the following link which it is too complicated and i couldn't understand it.

    ( f o o b a r . l u ) Blog Archive Change JPA EntityManager connection properties at Runtime
    Last edited by zabltn; 03-31-2012 at 08:29 AM.

Similar Threads

  1. how to give error message after validation of username and password
    By trupesh1991 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 01-17-2012, 12:54 PM
  2. user name and password validation
    By exose in forum New To Java
    Replies: 6
    Last Post: 01-20-2011, 03:59 PM
  3. Getting logged in user's password.
    By cool in forum AWT / Swing
    Replies: 2
    Last Post: 11-03-2010, 07:42 AM
  4. How to check password of a jsp/html with the password of Database(mysql) #1
    By sk.mahaboobbhasha@gmail.c in forum Java Servlet
    Replies: 2
    Last Post: 11-14-2008, 02:11 PM
  5. Creating a dialog to input user/password
    By prfalco in forum New To Java
    Replies: 4
    Last Post: 02-18-2008, 08:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts