Chapter 29 Flashcards

1
Q

Where we can give initialization parameters for servlet

A

In web.xml using pair values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is tag name of initialization parameters

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the first method called in applet and servlet

A

init

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is response redirection

A

We can redirect the response of the servlet to another application resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are two forms of response redirection

A

1- Sending a standard redirect

2- Sending a redirect to an error page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Does we have original request object in standard redirect

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the technique to access original request object after redirection

A

request dispatching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is servletcontext

A

For sharing resources among servlets in the same web application, we use ServletContext.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are context attributes

A

Context attributes are web application initialization parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How much servletcontext can be on a web page

A

One

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are 2 methods of request dispatcher

A

1- Forward

2- Include

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is request dispatcher forward

A

Allows a servlet to forward the request to another resource(servlet, JSP file, HTML file) in the same servlet context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between forward and include methods of request dispatcher

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly