I am doing a web application using servlets and jsps. I had a index.html
Now i need to avoid direct access of my login page from browser
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login App using Servlet and JSP</title>
</head>
<body bgcolor="pink">
<center>
<a href="Register.jsp">Register</a>
<a href="Login.jsp" >Login</a>
</center>
</body>
</html>
Now I want to prevent direct access of Login.jsp from the browser
http://localhost:9090/LoginAppWithServletsJSPJDBC/Login.jsp
By googling I came to know that I need to use <security-constraint>
for this.
Please help me .How can I achieve this.