Authenticating the username, password by using filters in Java (contacting with database)
String sql=”select * from reg where username=””+user+”” and pass=””+pwd+”””; This is an extremely bad practice. This approach requires that both username and password being passed around plain vanilla through requests. Moreover, you’ve there a SQL injection attack hole. Make use of sessions, in JSP/Servlet there you have the HttpSession for. There is really also no … Read more