Lifehacks

How do portlets work?

How do portlets work?

Portlets provide a means of presenting data from multiple sources in a meaningful and related way. Portlets can display excerpts of other web sites, generate summaries of key information, perform searches, and access assembled collections of information from a variety of data sources.

How to start Portlet?

Procedure

  1. To open the Deployment Portlet Wizard, from the project explorer view, right-click the portlet project and select Deploy Portlet.
  2. Select an existing server from the list or create a new one.
  3. On the Portlets page, define the Portlet Overwriting options:
  4. Click Finish.

What are the two types of rendering portlets?

There are two types of portlet requests—action requests and render requests.

What is a portlet in Liferay?

Web apps in Liferay DXP are called portlets. Like many web apps, portlets process requests and generate responses. In the response, the portlet returns content (e.g. HTML, XHTML) for display in browsers.

What are the different types of portlet urls and their use?

Portlet Types

  • Java Server Page (JSP) and HTML Portlets.
  • Java Portlets (JSR 168)
  • Java Page Flow Portlets.
  • Java Server Faces (JSF) Portlets.
  • Browser (URL) Portlets.
  • Struts Portlets.
  • Remote Portlets.
  • Portlet Type Summary Table.

What is portlet context in spring?

In addition to supporting conventional (servlet-based) Web development, Spring also supports JSR-286 Portlet development. As much as possible, the Portlet MVC framework is a mirror image of the Web MVC framework, and also uses the same underlying view abstractions and integration technology.

How do I find the portlet URL?

To get the URL of the portlet that performs an action on an entity, call one of PortletProviderUtil ‘s getPortletURL methods. These methods return a javax. portlet. PortletURL based on an HttpServletRequest or PortletRequest .

What is a portlet?

Usually, the Portlet doesn’t render a plain HTML, it’s contained other resources like JavaScript, images and StyleSheets. Also, the view mode isn’t the only mode that you lets the end user contact with, EDIT and HELP modes are also supported by the Portlets.

How do I access the portlet?

The Portlet can be accessed only via using a Portal page, as it’s reside there. However, a Portlet can create a URL that targets itself in the Portlet container (i.e by clicking a link or submitting a form) the result is a new client request to the Portal targeted to the Portlet as we already did when submitting HelloWorldPortlet above.

What are the issues with portlet?

The major issue that you might find it so important, is that the Portlet is running in a multi threaded manner, so be careful when it comes to handle shared resources.

What are the business scenarios for portlet?

The business scenarios are more complicated then normal and they require a full knowledge about the Portlet, Portlet Life cycle and how could provide a compliant enhanced Portlet that complying with the latest standards presented at the Portlet field.