I want to know the JSP of the open portlet when developing Liferay
If you want to know the JSP of an open portlet during development
Gregory Amerson, the chief engineer of Liferay development tools, displays the corresponding JSP of the portlet used on Chrome, called JSP Spy He created extensions and bundles.
Now that you've set up Liferay and have the Liferay Blade tool installed, let's move on.
How to use
First, set the following in portal-ext.properties
.
include-and-override=portal-developer.properties
direct.servlet.context.enabled=false
- git clone the JSP Spy repository.
- Initialize your Liferay server with
blade server init
.
blade server run
starts the Liferay server
- Deploy the bundle to your Liferay server with
blade deploy
.
- If you are using the Chrome browser, click [Open extension page. ](Chrome: // extensions)
- Enable developer mode. (On the right side)
- Select Load unpackaged extension and select [jsp-spy-chrome-extension] on disk (https://github.com/gamerson/jsp-spy-demomodules/jsp-spy-chrome- (extension) is specified.
- Go to Liferay and go to the Chrome browser development tools. (Shortcut is
Cmd + Option + I
)
- In Select Element, select the DOM element for your page.
- Click the JSP Spy pane in the element sidebar, and the path of the corresponding JSP will be displayed there.
How about that? When you follow the code, you don't have to go through the steps of finding the portlet name, finding view.jsp
, looking at the code and predicting the link destination ...!
Happy Liferay Coding!