Multiple choice technology web technology

Assuming that you are developing a Web Application called 'myApp'. You have a file called secret.txt which is part of the original Application, but you don't want your clients to gain access to it. What is the preferred way to do this?

  1. Place the file 'secret.txt' in a directory called 'protected' in the 'myApp' Web Application.

  2. Place the file 'secret.txt' in a directory called 'private' in the 'myApp' Web Application.

  3. Place the file 'secret.txt' in a directory called 'WEB-INF' in the 'myApp' Web Application.

  4. Any filename starting with 'secret' are usually not accessible by the Clients, so this file can be places anywhere in the Web Application.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The WEB-INF directory is specially protected in the web application structure - contents cannot be directly accessed by clients via URLs. Options A and B ('protected' and 'private' directories) are not special. Option D is incorrect - filenames starting with 'secret' have no special protection.