Die meistgefragten Interviewfragen und Antworten sowie Online-Tests
Lernplattform fur Interviewvorbereitung, Online-Tests, Tutorials und Live-Ubungen

Baue deine Fahigkeiten mit fokussierten Lernpfaden, Probetests und interviewreifem Inhalt aus.

WithoutBook vereint themenbezogene Interviewfragen, Online-Ubungstests, Tutorials und Vergleichsleitfaden in einem responsiven Lernbereich.

Interview vorbereiten

Servlets Interviewfragen und Antworten

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

Verwandte Vergleiche

JSP vs Servlets

Frage 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().

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 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.

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 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.

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Frage 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.

Ist das hilfreich? Kommentar hinzufugen Kommentare ansehen
 

Am hilfreichsten laut Nutzern:

Copyright © 2026, WithoutBook.