Week 2 Flashcards

1
Q

JavaBean definition?

A

Java public class that follows 3 rules

  1. Is seriazable
  2. Has a public no-argument constructor
  3. Has necessary get/set methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JavaBean definition?

A

Java public class that follows 3 rules

  1. Is seriazable
  2. Has a public no-argument constructor
  3. Has necessary get/set methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to use Javabean?

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

What does servlet class inherit from?

A

Http Servlet

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

HttpServletRequest contains?

A

ip address
previously set cookies
data submitted with an input form
browser information

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

HttpServletResponse contains?

A

generated web-pages
new cookies
error codes
redirects

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

Forwarding

A

Forwarding happens entirely on server side

Browsers do not have a clue if forwarding happened

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

What does a model do?

A

Encapsulates core data and logic
Independent from views
Model can be implemented with JavaBeans

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

What does a view do?

A

Present the outputs to the user

Can be implemented with jsp

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

What does a controller do?

A

Receives inputs from the user
Handles inputs
Connects model data to views and dispatches the views

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

Servlet Context parameters?

A

Global application parameters

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

Servlet Context parameters?

A

Global application parameters

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

How to use Javabean?

A

////

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

What does servlet class inherit from?

A

Http Servlet

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

HttpServletRequest contains?

A

ip address
previously set cookies
data submitted with an input form
browser information

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

HttpServletResponse contains?

A

generated web-pages
new cookies
error codes
redirects

17
Q

Forwarding

A

Forwarding happens entirely on server side

Browsers do not have a clue if forwarding happened

18
Q

What does a model do?

A

Encapsulates core data and logic
Independent from views
Model can be implemented with JavaBeans

19
Q

What does a view do?

A

Present the outputs to the user

Can be implemented with jsp

20
Q

What does a controller do?

A

Receives inputs from the user
Handles inputs
Connects model data to views and dispatches the views

21
Q

Servlet Init Parameters?

A

Servlet initialization parameters are defined for specific servlets and available only inside of the servlets

Servlet initialization params not global

22
Q

Servlet Context parameters?

A

Global application parameters

23
Q

What is GET?

A

Get shouldnt be used for saving big data
confidential info
no resubmission

24
Q

Servlet ContextListener?

A

Is an interface that needs
contextInitalized
contextDestroyed

25
Q

Commonly used JSTL libraries?

A

c - core tasks
fmt - formatting numbers
fn - functions
x - manipulations of xml