Chapter 29 Flashcards
Where we can give initialization parameters for servlet
In web.xml using pair values
What is tag name of initialization parameters
What is the first method called in applet and servlet
init
What is response redirection
We can redirect the response of the servlet to another application resource.
What are two forms of response redirection
1- Sending a standard redirect
2- Sending a redirect to an error page
Does we have original request object in standard redirect
No
What is the technique to access original request object after redirection
request dispatching
What is servletcontext
For sharing resources among servlets in the same web application, we use ServletContext.
What are context attributes
Context attributes are web application initialization parameters
How much servletcontext can be on a web page
One
What are 2 methods of request dispatcher
1- Forward
2- Include
What is request dispatcher forward
Allows a servlet to forward the request to another resource(servlet, JSP file, HTML file) in the same servlet context
What is the difference between forward and include methods of request dispatcher
In forward, request is sent from servlet 1 to servlet 2 and response is sent to person. But in include, request is sent from servlet 1 to servlet 2 and response is sent from servlet 2 to servlet 1 and then to person.