1. Struts 2: the modern web application framework Flashcards

1
Q

What is a Framework?

A

Piece of structural software. It tries to make generalizations about common tasks and workflows. These generalizations (conventions over configuration) allow applications to be built more quickly.

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

What do Interceptors do?

A

Run before an action, and after a result.

They don’t HAVE to do something both times, but they have the opportunity to.

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

What’s the purpose of interceptors? Think of a good example for an interceptor.

A

They allow common cross-cutting tasks to be defined in clean, reusable components.

Logging could be a good example, we want to log all requests but it doesn’t belong in any single actions unit of work.

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

What is the ValueStack? Explain what it does.

A

It’s a storage area that holds all of the data associated with the processing of a request.

Think of it as a piece of scratch paper where the framework does its work while processing a request. Rather than passing this data around, it’s kept in a central location–the ValueStack.

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

What is OGNL?

A

It’s an expression language that allows us to access the data we put in the ValueStack.

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

What context is the ValueStack stored in?

A

Inside the ThreadLocal context called the ActionContext.

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