LOT-959 Free Dumps Study Materials
Question 12: What content is displayed when accessing TestPortlet in the VIEW mode? public class TestPortlet
extends javax.portlet.GenericPortlet { public void doView(RenderRequest request, RenderResponse
response) throws PortletException, IOException
{ response.setContentType(request.getResponseContentType()); response.getWriter().println("Executing
CertTrialPortlet.doView()"); } @RenderMode(name="view") public void handleView(RenderRequest
request, RenderResponse response)throws PortletException,
IOException{ response.setContentType("text/html");\ response.getWriter().println("Executing
CertTrialPortlet.handleView()"); } }
A.Executing CertTrialPortlet.doView()
B.Executing CertTrialPortlet.handleView()
C.IllegalStateException because you cannot have both @RenderMode=view and doView() in same
portlet
D.Compiler error indicating that you cannot have both @RenderMode=view and doView() in TestPortlet
class.
Correct Answer:B