%%struts quiz

brief points? ok
j4: keep for review in 2 years

[g=generic servlet/jsp issue]

  1. [i] error-handling is relatively simple but imp2iview. What kind of entities read ActionErrors and how are they used? views?
  2. ActionForward ^ ActionForwards ? P 113
  3. where does Struts use reflection and introspection? P 114
  4. do you need to manage sessions or struts does it for you?
  5. [i] what kind of data structure to hold multiple errors in ActionErrors (No need to be exact) ?
  6. how2get an afbean from a mapping object? Is the afbean “contained” (HAS-A) in the mapping obj? I think when the afbean object exists in JVM, the mapping obj provides a path to it.
  7. [gi] when does a session start and in which method? probably by ActionServlet
  8. [i] signature and usage of findForward()? defined in which class? P 741 [[ ?? ]]
  9. [gi] is ActionServlet a singleton?
  10. which object invokes the afbean’s validate()?
  11. how does execute() retrieve the afbean? from the argugment mapping obj or from the request argument?
  12. how2get formbean from req? when ? when req is forwarded to a non-struts servlet or another struts servlet?
  13. [i] which method(s) return ActionErrors (see the trailing s), following which well known design pattern?
  14. let’s zoom into Struts’ usage of dataSource class in standard java. which struts components interact with a datasource?
  15. [g] is ActionServlet a single-threaded servlet, and need many sisters to service simultaneous requests?
  16. [gi] How is ActionServlet thread-safe?
  17. session in struts is same as session in other servlets?
  18. <action input=…. means?
  19. <action name=…. means?
  20. struts connection pooling? no answer
  21. beside global forward and local forward, there’a 3rd way to DEFINE an afward. P189
  22. which validator xml file contains the javascript function? What’s the other major content in the samel xml? name of a method?
  23. controls the (non-validator) validate() method u create in your afbean, but what if u use validator?
  24. 1 basic use of var in validator.xml? p378
  25. #1 most basic validator in the validator package? how do u configure it in validator-rules.xml? p375
  26. aforward obj is returned by which method to whom? How is it used?
  27. [gi] in which method do u do jdbc connect? perhaps a M object not defined by struts
  28. why execute() need the map? local forwards?
  29. g how does a non-struts servlet retrieve afbean from the request (received by forward)? P221
  30. Without struts-validator, what page is returned to browser upon validation error? How do u make this takes place by configuration?
  31. biggest 2 struts extensions each can be used outside struts, and each defines its taglib. What’re the 2 tag prefixes?
  32. what return type do u use with a formbean getAmount() ? P155
  33. simple yet important AR question: which obj calls execute()? P 741
  34. where 2 spell out a regex? how 2 pass it into a validator
  35. can take one of 3 { include, forward, ???? } I think it’s type
  36. ignore validator for now. afbean usually defines an public instance method validate(). what’s the signature? revealing! P740
  37. [i] simple yet tricky question: exactly which object (loaded into the servlet container) acts as the router, inspecting and dispatching requests to other objects?
  38. signature of execute(). AR-revealing
  39. [gi] how does the query result get into the view? aforward? req obj? P 741 [[servlet]]
  40. [i] which obj auto-populates a formbean? ActionServlet?
  41. where is the Model object instantiated? P 741 [[ servlet ]]
  42. is the mysterious but important ActionServlet (full class name) mentioned in any prominent place? Hint: along with struts-config.xml. P 743 [[servlet]]
  43. during request processing flow, describe when the mapping object is loaded and how it controls each module such as form population/valiation, forward, custom action etc. P47.
  44. example of httpSession in struts? P79


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s