2. Saying hello to Struts 2 Flashcards
What is declarative architecture?
Type of configuration that allows developers to describe their application architecture at a higher level than direct programmatic manipulation.
Involved defining Struts 2 components and linking them together or wiring them together to make workflow paths.
What are the two ways you can configuring your application?
XML-Configuration
Annotated Java Files
What is the anatomy of a URL in regards to mapping to a Struts 2 action namespace?
Protocol -> Hostname:Port Number -> Servlet context -> package namespace -> action name.action
What’s the syntax for a standard JSP directive?
How do you “enable” automatic scanning of annotations?
In your web.xml you would add an init param called actionPackages and give it the value of the package you want it to scan.
How can you mark a class as an Action?
Either implement the Action interface, or by using naming convention where class name ends in Action.