I have a NetBeans web project on
Tomcat 8.0.15, MySql (with Jconnector), Servlet/Jsp. I need a secure login!!!
There is a login page. On successful login, if it is admin,
servlet redirects to the admin page, if username is of a standardUser, the servlet redirects to the main page.
For now nothing works. The page is not redirected by servlet, on submit button press the error.html appears and shows response.getStatus() is 0!!! I tested(without login) servlet for username/password check against the DB and it works.
so Here is my code files: login.jsp:
web.xml:
Context.xml:
Login.java:
Is context.xml - realm needed?
Why error.html appears and shows response.getStatus() is 0?
So, how to create a secure login?
How j_security_check connects to my MySql database!? - maybe that' the problem error page shows after login...?