Web Security Question:
Download Questions PDF

How to write a program that defines the use of fail-safe approach?

Web Security Interview Question
Web Security Interview Question

Answer:

- Fail-safe approach is being designed to save the system from any failure that can come without any reason.

- This includes developing of the client system that requires the password to be sent to authentication server and if the server is down then the access to all the users is denied by default.

- The program is given to use in case of failure and it is as follows:

osw.write ("HTTP/1.0 200 OK\n\n");
while (c != -1) {
sb.append((char)c);
c = fr.read();
}
osw.write (sb.toString());

- This program defines the security of the requested file and it tells that if the file is opened and read successfully then return OK response and sends the content of the file.

Download Web Security Interview Questions And Answers PDF

Previous QuestionNext Question
Explain what does following lines of code show?Can you explain what needs to be done for having the fail-safe stance?