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 = "<>"; }
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb9f4464e-493d-40ac-8ed8-6cb5c20bcfbb%2Fd2f126a1-f03f-4dea-9136-dfdae6d66a98%2Fb1qzm1_processed.png&w=3840&q=75)
![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".](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb9f4464e-493d-40ac-8ed8-6cb5c20bcfbb%2Fd2f126a1-f03f-4dea-9136-dfdae6d66a98%2F6a9bc8vd_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 7 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)