1. Struts 2: the modern web application framework Flashcards
What is a Framework?
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.
What do Interceptors do?
Run before an action, and after a result.
They don’t HAVE to do something both times, but they have the opportunity to.
What’s the purpose of interceptors? Think of a good example for an interceptor.
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.
What is the ValueStack? Explain what it does.
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.
What is OGNL?
It’s an expression language that allows us to access the data we put in the ValueStack.
What context is the ValueStack stored in?
Inside the ThreadLocal context called the ActionContext.