Define Security Contraints

Steps

  1. Create a Folder in your web app called: C:\@StudentWebApp\SecretStuff
  2. Create a file inside of SecretStuff : C:\@StudentWebApp\SecretStuff\index.jsp
  3. Open deployment descriptor Path
  4. Add a security-constraint Code

Final Source

  • Source: /SecretStuff/index.jsp
  • Source: /WEB-INF/web.xml
  • Run It

  • /SecretStuff/index.jsp
  • (You should be prompted for a username and password)