Java Web Technology Fundamentals

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

Flashcards to review key concepts of Java Web Technology, HTTP methods, and Servlet lifecycle.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

What is the foundation of the web?

A network of clients and servers communicating over wired and wireless networks.

2
New cards

What is the role of a web client?

To make a request to a web server.

3
New cards

What is the role of a web server?

To receive and process requests to access resources and respond to the client.

4
New cards

What is the difference between a website and a web application?

A website contains static web pages, while a web application features dynamic functionality on the server-side.

5
New cards

What is HTTP (Hypertext Transfer Protocol)?

A protocol that allows clients and servers to communicate on the web.

6
New cards

What is the GET method used for in HTTP?

To request data from the server.

7
New cards

What is the POST method used for in HTTP?

To send data to the server to create or update a resource.

8
New cards

In the GET method, where is the data sent?

Data is sent in the URL (hidden).

9
New cards

In the POST method, where is the data sent?

Data is sent in the request body.

10
New cards

Which HTTP method allows for sending larger amounts of data, GET or POST?

POST allows for sending larger amounts of data.

11
New cards

Which HTTP method is more secure, GET or POST?

POST is more secure because data is not exposed in the URL.

12
New cards

Which HTTP method can be bookmarked?

GET can be bookmarked.

13
New cards

Which HTTP method can be cached for efficiency?

GET can be cached and is more efficient.

14
New cards

What are Servlets?

Java technology components that create dynamic web applications, provide classes and interfaces for web development, implement the Servlet interface, and extend the capabilities of a server to handle incoming requests.

15
New cards

What is the basic server architecture?

A web browser (client) sends a request to the server, the server processes the request, and the server sends a response back to the web browser, often in the form of formatted HTML pages.

16
New cards

Give three tasks that Servlet programs perform.

Processing data sent by the client, including HTML forms; securing data; generating results by communicating with databases; and formatting data into HTML or JSP for the web browser.

17
New cards

What occurs during the Servlet lifecycle loading phase?

The servlet loads and instantiates objects and attributes.

18
New cards

What happens during the Servlet lifecycle initialization phase?

The servlet is initialized by calling the init method, indicated by a servlet container.

19
New cards

What happens during the Service phase of the servlet lifecycle?

The servlet calls the service method to process client requests and handles the actual request.

20
New cards

What happens during the destruction phase of the Servlet lifecycle?

The servlet is terminated by calling the destroy method, which runs only once at the end of its lifecycle.

21
New cards

When is the init() method called in the Servlet lifecycle?

Called once when the servlet is first loaded.

22
New cards

When is the service() method called in the Servlet lifecycle?

Called for each client request.

23
New cards

When is the destroy() method called in the Servlet lifecycle?

Called once when the servlet is unloaded.

24
New cards

What objects are created when a client sends a request to a servlet container?

ServletRequest and ServletResponse objects.

25
New cards

What does the ServletRequest object do?

Provides access to request information such as headers and body.

26
New cards

What does the ServletResponse object allow the servlet to do?

Format and send a response back to the client.