LRP-614 practice question 25 of 25
Portlets that extend MVCPortlet require annotations on action methods.
Full set: 144 questionsThe statement is false because while using annotations like @ProcessAction is the modern, recommended, and most common way to handle action requests in a Liferay MVCPortlet, it is not a strict requirement. The MVCPortlet framework provides this annotation-driven mechanism for convenience and to reduce boilerplate code. However, developers can still fall back on the standard Java Portlet Specification (JSR 286/362) pattern by overriding the processAction(ActionRequest, ActionResponse) method directly in their portlet class. In this overridden method, they can implement their own logic to dispatch requests, for example, by using a switch statement on a request parameter. The annotation-based approach is an abstraction layer provided by Liferay, not a mandatory replacement for the underlying portlet lifecycle method.
The "True" option is incorrect because the word "require" implies that there is no other way to implement action phase logic in a portlet extending MVCPortlet. This is factually wrong, as overriding the processAction method is a valid, albeit more verbose, alternative that bypasses the need for action method annotations. ---
1. Liferay Developer Documentation, "Processing an Action": This official guide describes the annotation-based approach. Crucially, it states, "The recommended way to implement action methods is to annotate them with @ProcessAction". The use of the word "recommended" explicitly implies that other, non-recommended ways exist, thus confirming that annotations are not a strict requirement.
Source: Liferay Learn, "Processing an Action" tutorial for Liferay 7.4. (The principle is identical for all Liferay 7.x versions relevant to the LRP 614 exam).
2. Liferay Developer Documentation, "MVC Portlet": This documentation explains that MVCPortlet is Liferay's implementation of the Model-View-Controller pattern for portlets, designed to simplify development. It builds upon the standard portlet lifecycle. The ability to override base methods like processAction is fundamental to the Java inheritance model upon which MVCPortlet is built.
Source: Liferay Learn, "MVC Portlet" documentation.
3. Jakarta Portlet Specification (JSR 362), Section 15.3.2, "The Action Phase": The official specification defines the processAction method as the entry point for the action phase. Any class that implements the Portlet interface (which MVCPortlet does via its inheritance chain) must adhere to this contract. Liferay's annotation system is a layer on top of this fundamental contract, which can still be implemented directly by the developer.
Source: Jakarta Portlet Specification 3.0 (JSR 362), Page 103, Section 15.3.2. This specification is the foundation upon which Liferay portlets are built.
Keep practicing
Take the free LRP-614 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LRP-614 practice questions
- Question 1The best way to add a new language key to the portal is through:
- Question 2In a JSP that includes the tag, the method to check permissions is:
- Question 3A hook plugin can be used to: (Please select all correct answers.)
- Question 4An administrator would like to add a new travel preferences section in the Miscellaneous …
- Question 5The following statements about plugins are true: (Please select all correct answers.)
- Question 6All Service Builder entities contain a local reference to: (Please select all correct ans…
