Chapter 1. Intro and Overview: Why use Servlets & JSPs? Flashcards

1
Q

What is a CGI program?

A

Non-java term for a web server helper app. Stands for Common Gateway Interface.

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

What’s the equivalent to CGI in a Java application?

A

Servlet.

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

What is the web.xml called? What is it used for?

A

Deployment Descriptor

Used to declare our servlets, as well as setting a URL pattern to a servlet.

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

Where does the Deployment Descriptor file go?

A

WEB-INF folder

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

What base class do you extend to make a Servlet class?

A

HttpServlet

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

Suppose you wanted to create a method on your servlet that handles post requests, what would that method look like?

A

Void return type, accepts HttpServletRequest & HttpServletResponse.

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