LOT-959 Free Dumps Study Materials
Question 11: Sunil is developing a database access portlet. He wants to query the database in the processAction()
method and pass complex data transfer object to render() method for rendering. What mechanism would
you suggest to Sunil for transferring custom java object from action to render phase?
A.Only way to pass data from Action to render phase is using PortletSession object
B.You cannot pass custom object created in processAction() method to render() method. If you do so it
will result in ClassCastException when you try to access that object in render() method.
C.The default value of javax.portlet.actionScopedRequestAttributes container runtime option is true. So
you can set custom java object as request attribute on ActionRequest and it will be available as request
attribute in RenderRequest.
D.Change portlet.xml to set the javax.portlet.actionScopedRequestAttributes container runtime option to
true. Once actionScopedRequestAttributes is set to true you can set custom java object as request
attribute on ActionRequest and it will be available as request attribute in RenderRequest..
Correct Answer:D