Chapter 28 Flashcards

1
Q

Can we create and destroy servlet

A

Yes

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

What is servlet life cycle/stages

A

1- Initialize
2- Service
3- Destroy

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

What is method to initialize servlet

A

init()

It is called only once

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

Is there constructor in servlet

A

No

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

What method is used for service for servlet

A

service()

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

What is service stage of servlet

A
The  service()  stage is the engine of the servlet, which actually processes the client’s request. On every  request from the client, the server spawns a new thread  and calls the service() method. This makes it more efficient as compared to the technologies that use 
single thread to respond to requests.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is method for destroy stage of servlet

A

destroy()

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

What is destroy stage

A

The web server may decide to remove a previously loaded servlet instance. It is called servlet destroy.

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

What are 2 types of data submit to web server

A
  1. Form data

2. HTTP Request Header Data

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

What are 3 methods of HttpServletRequest to extract data from html form

A

getParameter
getParameterValues
getParameterNames

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

What is the port number of tomcat server bundled with netbeans by default

A

8084

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