Servlets Flashcards

1
Q

how do web servers work?

A

Web servers use a networking protocol called HTTP to send web pages to users

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

What is HTTP?

A

HTTP = HypterText Transfer Protocol

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

What can a client computer do with HTTP?

A

The client comp can use a uniform resource locator (URL) to request a document that’s located on the server computer.

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

What kind of model does HTTP use?

A

HTTP uses a request/response model

client computers (web users) send request messages to HTTP servers
then, the HTTP servers send response messages back to clients
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some basic HTTP interations?

A

Client computer’s web-browser program server computer

client computer -File request-> server computer -File as HTTP response message-> client

web browser receives file, interprets the HTML within it, and displays result on screen

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

Normal web interactions are “static”. What does that mean?

A

The content of the file sent to the user is always the same.

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

What is a servlet?

A

A java program that extends the javax.servlet.Servlet class

This class enables the program to run on a web server in response to a user request. Output from the servlet is sent back to the web user as an HTML page.

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

How is using a servlet different from using JWS?

A

The server computer receives the servlet request, locates the Java program indicated by request, runs it and returns the output from the program as an HTTP response message. Instead of file contents, the server sends the generated output of the servlet program.

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

What is a servlet engine?

A

It allows a user’s computer to act as a server to run servlets. The best known servlet engine is Apache Tomcat, which also works as a basic web server.

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