Servlets preguntas y respuestas de entrevista
Diferencias relacionadas
Pregunta 21. The code in a finally clause will never fail to execute, right?
Using System.exit(1); in try block will not allow finally code to execute.
Pregunta 22. What mechanisms are used by a Servlet Container to maintain session information?
Cookies, URL rewriting, and HTTPS protocol information are used to maintain session information
Pregunta 23. Difference between GET and POST
In GET your entire form submission can be encapsulated in one URL, like a hyperlink. query length is limited to 260 characters, not secure, faster, quick and easy.
In POST Your name/value pairs inside the body of the HTTP request, which makes for a cleaner URL and imposes no size limitations on the form's output. It is used to send a chunk of data to the server to be processed, more versatile, most secure.
Pregunta 24. What is session?
The session is an object used by a servlet to track a user's interaction with a Web application across multiple HTTP requests.
Pregunta 25. What is servlet mapping?
The servlet mapping defines an association between a URL pattern and a servlet. The mapping is used to map requests to servlets.
Lo mas util segun los usuarios:
- What is Servlet?
- Why is Servlet so popular?
- What is servlet container?
- When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
- If a servlet is not properly initialized, what exception may be thrown?