This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have the following problem:
- I wrote a basic JSP Coding to save an User-Account (Login and Password) to the Database.
- I have 2 Inputfields in my JSP file (Logon+Password), the value of these Inputfields are given to a Bean.
- My Bean has the coding below:
My problem is, I can not estabilish a connection with the database with this coding. Manually I can start my database with the above values.
My other problem is, if I set a breakpoint somewhere in the method public void createConnection()... , my application is never stopping at this breakpoint, so I can not debugging my coding. But if I set a breakpoint somewhere else, I can debug my coding without any problems.
1. You have to drop the newInstance(); from the line 47
2. Remove dbName from this (DriverManager.getConnection(url + dbName, userName, passwort); ) because getConnection function takes only (URL,userName, Password)
3. create a main method in this class and make a call to the function that you want to debug....