Neil Griffin created PLUTO-704: ---------------------------------- Summary: PortletV3Demo RedirectPortlet has incomplete/non-validating definition in portlet.xml Key: PLUTO-704 URL: https://issues.apache.org/jira/browse/PLUTO-704 Project: Pluto Issue Type: Improvement Components: demo portlets Affects Versions: 3.0.0 Reporter: Neil Griffin Assignee: Scott Nicklous Fix For: 3.0.1
It is possible to register a portlet both with {{@PortletConfiguration}} and in portlet.xml, but the registration definition in portlet.xml will take precedence. For example, the PortletV3Demo has a portlet definition registered via annotation: {code:java|title=RedirectPortlet.java} @PortletConfiguration(portletName="V3RedirectPortlet") public class RedirectPortlet extends GenericPortlet { ... } {code} But it is also registered in the the portlet.xml descriptor: {code:xml|title=portlet.xml} <portlet> <portlet-name>V3RedirectPortlet</portlet-name> <portlet-info> <title>Redirect Test Portlet</title> </portlet-info> </portlet> {code} The problem is that the XML definition is incomplete/non-validating since it does not contain a {{<supports>...</supports>}} element. Since the demo portlet does not seem to be testing whether or not portlet.xml takes precedence, the proposed solution would be to remove incomplete/non-validating definition from portlet.xml and specify the portlet title in the annotation: {code:java|title=RedirectPortlet.java} @PortletConfiguration( portletName="V3RedirectPortlet", title = @LocaleString(value = "Redirect Test Portlet")) public class RedirectPortlet extends GenericPortlet { ... } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)