{"id":48819398,"url":"https://github.com/vaadin/base-starter-flow-portlet","last_synced_at":"2026-04-14T14:02:24.944Z","repository":{"id":35694429,"uuid":"204706933","full_name":"vaadin/base-starter-flow-portlet","owner":"vaadin","description":"Base project for Flow portlet applications","archived":false,"fork":false,"pushed_at":"2026-03-10T07:22:51.000Z","size":4626,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-10T15:08:09.045Z","etag":null,"topics":["java","pluto","portal","portlet","web","webapp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaadin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-08-27T13:15:23.000Z","updated_at":"2025-11-04T11:35:53.000Z","dependencies_parsed_at":"2024-05-06T12:53:37.766Z","dependency_job_id":null,"html_url":"https://github.com/vaadin/base-starter-flow-portlet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vaadin/base-starter-flow-portlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin%2Fbase-starter-flow-portlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin%2Fbase-starter-flow-portlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin%2Fbase-starter-flow-portlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin%2Fbase-starter-flow-portlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaadin","download_url":"https://codeload.github.com/vaadin/base-starter-flow-portlet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin%2Fbase-starter-flow-portlet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31799411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","pluto","portal","portlet","web","webapp"],"created_at":"2026-04-14T14:02:24.091Z","updated_at":"2026-04-14T14:02:24.928Z","avatar_url":"https://github.com/vaadin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vaadin Portlet Starter Project\nProject to get started with a Vaadin 23.1+ application that is running inside a portlet in a Liferay 7 Portal.\n\n**Prime** Vaadin subscription is required for this starter project and for all the applications using Vaadin Portlet.\nYou also need to have Java 11 (or later) installed.\n\nClone the repository and import the project to the IDE of your choice as a Maven project.\n\nThe documentation for Vaadin Portlet support is available [here](https://vaadin.com/docs/latest/flow/integrations/portlet).\n\n## Project demo\nRun the following profile to automatically download and set up the Liferay bundle:\n\n`mvn clean package -Pdemo`\n\nStart the Liferay with your portlet:\n\n`mvn cargo:run`\n\n## Set up Liferay manually and running the portlet\n\nBefore the portlet application can be run, it must be deployed to a [Liferay](https://www.liferay.com/downloads-community):\n\n1. Build the whole project using `mvn install -DskipTests` in the root\n\n2. We assume Liferay is running in http://localhost:8080/, an easy way to run a local\n   copy of Liferay is to use their official [docker images](https://hub.docker.com/r/liferay/portal).\n   Below is an example of a docker-compose file you can use.\n\n````\nversion: \"2.2\"\nservices:\n    liferay-dev:\n        image: liferay/portal:7.2.1-ga2\n        environment:\n            - LIFERAY_JAVASCRIPT_PERIOD_SINGLE_PERIOD_PAGE_PERIOD_APPLICATION_PERIOD_ENABLED=false\n        ports:\n            - 8080:8080\n            - 8000:8000\n        volumes:\n            - ./deploy:/mnt/liferay/deploy\n            - ./files:/mnt/liferay/files\n````\n\n   The following steps describe how to set up the Liferay regardless of what way \nof Liferay distribution you choose: bundle or Docker image. \n\n3. Add the following to the end of the last line in Tomcat's `setenv.sh`\n   (`/var/liferay/tomcat-\u003cversion\u003e/bin`) before starting Liferay. When\n   using the above docker-compose file place an edited copy of `setenv.sh`\n   in `./files/tomcat/bin`.\n\n````\n -Dvaadin.portlet.static.resources.mapping=/o/vaadin-portlet-static/\n````\n\n4. Download and add the Jna dependency JARs of a certain version into\n   `/var/liferay/tomcat-\u003cversion\u003e/webapps/ROOT/WEB-INF/lib`:\n    - [net.java.dev.jna:jna:5.7.0](https://mvnrepository.com/artifact/net.java.dev.jna/jna/5.7.0)\n    - [net.java.dev.jna:jna-platform:5.7.0](https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform/5.7.0)\n\n   How to copy these files is described [here](https://learn.liferay.com/dxp/latest/en/installation-and-upgrades/installing-liferay/using-liferay-docker-images/providing-files-to-the-container.html#using-docker-cp)\n\n   This is needed because Liferay uses an older version of Jna and running\n   Vaadin Portlet in dev mode causes a conflict of dependencies used by Liferay\n   and Vaadin License Checker (`NoClassDefFound` exception).\n\n   Here is a useful [docs](https://learn.liferay.com/dxp/latest/en/building-applications/reference/jars-excluded-from-wabs.html) describing how to add third-party dependency version you want.\n\n5. Run `docker-compose up`\n\n6. Deploy all wars: `vaadin-portlet-static.war` and `portlet-starter.war`\n   to your docker container by copying them to `./deploy/` (the copied files should disappear when deployed).\n\n7. Wait for the bundles to start, then visit http://localhost:8080/.\n   Set up a new user if you're running Liferay for the first time. Default is `test@liferay.com`/`test`.\n   Log in into Liferay.\n\n8. The deployed portlet needs to be added to a portal page. Do this by\n- Selecting the Plus or the Pen icon near top right of the page (exact\n  placement and look\n  varies by Liferay version) add elements to the current page.\n- Under Widgets on the right sidebar find Vaadin Liferay Portlet category under which\n  you will find entry for MyPortlet1, drag and drop it onto the page.\n- If at the top right of the page, in edit mode, you see a Publish button,\n  use it to make your changes public (7.3+).\n  \n## Remote debugging for Liferay\n\nIn order to remote debug your portlet under Liferay add the following to the end of the last line in\nTomcat's `setenv.sh` (`/var/liferay/tomcat-\u003cversion\u003e/bin`) before starting Liferay. When using the\nabove docker-compose file place an edited copy of `setenv.sh` in `./files/tomcat/bin` before\n`docker-compose up`.\n\n````\n -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000\n````\n\nRemote debugging (JDWP) is now available on port 8000 (to activate\nin IntelliJ, choose `Run -\u003e Attach to Process...`).\n\n## Production build\nBefore deploying your portlet for production for the first time, you will\nprobably want to change `portlet-name` in `portal.xml` from `TestPortlet1` to\nsomething else, as well as the tag returned by `MyPortlet.PORTLET_TAG` from\n`portlet-content` to something else (stock Pluto already contains portlets with\nthese names). Then build the production .war:\n\n`mvn package -Pproduction`\n\nCopy both `portlet-starter.war` and `vaadin-portlet-static.war` from `/target`\nfolder into the `deploy` folder of a Liferay container.\n\n## Portlet development in servlet mode\n\nIt is possible to develop portlets as normal single route Vaadin applications.\n\n**Note:**\nWhen developing using servlet mode no Portlet specific methods can be used\nin the view for servlet mode. \n\nTo develop portlets in servlet mode using jetty create a Route for portlet content e.g.\n\n```java\npackage com.vaadin.starter.portlet;\n\nimport com.vaadin.flow.router.Route;\n\n@Route(\"\")\npublic class ServletDevelopment extends MyPortletContent {\n}\n```\n\nThen run the project as `mvn clean jetty:run -Pservlet`\n\n### Creating a Portlet with servlet mode\n\nTo create an application that can be used both as a portlet and a servlet application\nyou need to check at generation time the `Request` type.\n\nFor instance `MyPortletContent` could be setup as\n\n```java\npublic class MyPortletContent extends VerticalLayout {\n    public MyPortletContent() {\n        String message;\n        if (VaadinRequest.getCurrent() instanceof PortletRequest) {\n            VaadinPortlet portlet = VaadinPortlet.getCurrent();\n            String name = portlet.getPortletName();\n            String serverInfo = portlet.getPortletContext().getServerInfo();\n            message = String\n                    .format(\"Hello from %s running in %s!\", name, serverInfo);\n        } else {\n            message = String\n                    .format(\"Hello from %s running in a servlet container\",\n                            getClass().getSimpleName());\n        }\n        Button button = new Button(\"Click me\",\n                event -\u003e Notification.show(message));\n        add(button);\n    }\n}\n```\n\n### Current known issues running under Liferay\n\nSee Vaadin Portlet [release notes](https://github.com/vaadin/portlet/releases) for a limitation and known issues list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin%2Fbase-starter-flow-portlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaadin%2Fbase-starter-flow-portlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin%2Fbase-starter-flow-portlet/lists"}