• +91 9723535972
  • info@interviewmaterial.com

Servlet Interview Questions and Answers

Question -
Can you send an Authentication error from a Servlet?



Answer -

Yes, we can use setStatus(statuscode) method of HttpServletResponse to send an authentication error.  All we have to do is to set an error code and a valid reason along with the error code.

response.sendError(404, "Page not Found!!!" );

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners