help me java web (Can you guide the solution?) 1)file db DbContext public class DBContext {     protected Connection connection;     public DBContext()     {                 try {             String user = "sa";             String pass = "123456789";             String url = "jdbc:sqlserver://MSI:1433;databaseName=MyOrder";             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");             connection = DriverManager.getConnection(url, user, pass);         } catch (ClassNotFoundException | SQLException ex) {             Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);         }     } } 2)public class DBContext1 {               public Connection getConnection()throws Exception {         String url = "jdbc:sqlserver://"+serverName+":"+portNumber +";databaseName="+dbName;         Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");         return DriverManager.getConnection(url, userID, password);     }        private final String serverName = "<>";     private final String dbName = "<>";     private final String portNumber = "<>";     private final String userID = "<>";     private final String password = "<>";           }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

help me java web (Can you guide the solution?)

1)file db DbContext

public class DBContext {
    protected Connection connection;
    public DBContext()
    {
       
        try {
            String user = "sa";
            String pass = "123456789";
            String url = "jdbc:sqlserver://MSI:1433;databaseName=MyOrder";
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            connection = DriverManager.getConnection(url, user, pass);
        } catch (ClassNotFoundException | SQLException ex) {
            Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}

2)public class DBContext1 {
    
   
     public Connection getConnection()throws Exception {
        String url = "jdbc:sqlserver://"+serverName+":"+portNumber +";databaseName="+dbName;
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        return DriverManager.getConnection(url, userID, password);
    }
  
    private final String serverName = "<<server-name>>";
    private final String dbName = "<<database-name>>";
    private final String portNumber = "<<port-number>>";
    private final String userID = "<<user-id>>";
    private final String password = "<<password>>";
    
    
}

Note: Use given DbContext class to access the database, ONLY MODIFY the url, username, and
password inside the DbContext. 0 will be given to the work that tries to restructured the DbContext.
Your task is to create a web page to allow users reseting password for a user:
Url to access your page: /reset (0 given for a wrong URL)
The page should be displayed as follows:
Account:
Name:
Birthdate:
Otherwise:
mm/dd/yyyy
Reset password
When user inputs information and click "Reset password" button:
If account,name,birthdate are wrong in DB, back this page.
Account: admin
Name: Nguyen Van A
Birthdate: 05/25/1986
Reset password
Transcribed Image Text:Note: Use given DbContext class to access the database, ONLY MODIFY the url, username, and password inside the DbContext. 0 will be given to the work that tries to restructured the DbContext. Your task is to create a web page to allow users reseting password for a user: Url to access your page: /reset (0 given for a wrong URL) The page should be displayed as follows: Account: Name: Birthdate: Otherwise: mm/dd/yyyy Reset password When user inputs information and click "Reset password" button: If account,name,birthdate are wrong in DB, back this page. Account: admin Name: Nguyen Van A Birthdate: 05/25/1986 Reset password
Move to "change pass" page:
Account:
Password:
Re-Password:
admin
Change password
When input pass, repass and click "Change password":
- If not input full texts or password not equal repassword, back "change pass" page.
Otherwise, update password in DB and move to login page (return account and new password
for login to show)
Account: admin
Password: 1234
LOGIN
Click "login" button with account and new pass, show message "Login successfully".
Transcribed Image Text:Move to "change pass" page: Account: Password: Re-Password: admin Change password When input pass, repass and click "Change password": - If not input full texts or password not equal repassword, back "change pass" page. Otherwise, update password in DB and move to login page (return account and new password for login to show) Account: admin Password: 1234 LOGIN Click "login" button with account and new pass, show message "Login successfully".
Expert Solution
steps

Step by step

Solved in 7 steps with 2 images

Blurred answer
Knowledge Booster
Lock objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education