Principais perguntas e respostas de entrevista e testes online
Plataforma educacional para preparacao de entrevistas, testes online, tutoriais e pratica ao vivo

Desenvolva habilidades com trilhas de aprendizado focadas, simulados e conteudo pronto para entrevistas.

WithoutBook reune perguntas de entrevista por assunto, testes praticos online, tutoriais e guias comparativos em um unico espaco de aprendizado responsivo.

Preparar entrevista

Servlets perguntas e respostas de entrevista

Test your skills through the online practice test: Servlets Quiz Online Practice Test

Diferencas relacionadas

JSP vs Servlets

Pergunta 31. When we don't write any constructor for the servlet, how does container create an instance of servlet?

Container creates instance of servlet by calling Class.forName(className).newInstance().

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 32. Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

Yes, but Before calling the destroy() method, the servlet container waits for the remaining threads that are executing the servlet?s service() method to finish.

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 33. What is the difference between callling a RequestDispatcher using ServletRequest and ServletContext?

>We can give relative URL when we use ServletRequest and not while using ServletContext.

Isto e util? Adicionar comentario Ver comentarios
 

Pergunta 34. Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

Since ServletRequest has the current request path to evaluae the relative path while ServletContext does not.

Isto e util? Adicionar comentario Ver comentarios
 

Mais uteis segundo os usuarios:

Copyright © 2026, WithoutBook.