Create a New Liferay Project
File-->New-->Liferay Plugin Project-->Project name:Sample
Next-->Finish
Created
Sample-portlet(If you create plugin type as portlet the name will be created as
portlet will be there along with project name)
After
creation of this Run the ant build(Right corner bottom of the screen) after build select your project under
Add in menu
Click on Add You can see This is the Sample portlet
Which is
displayed from view.jsp
If you want to display any thing go to eclipse and change in jsp.
Create New Portlet
Right click on
docroot/WEB-INF/src-->New-->Liferay Portlet-->Change portlet class, package
name-->Next Change from html to jsp-->Next-->Next-->Finish
Open your portlet.xml Remove <portlet>
to </portlet> which have portlet-class as MVCPortlet and keep other one Build again Refresh BrowseràRemove the undeployed
one and add again
Now the output will be This is Sample portlet
in view mode(Which is displayed from docroot jsp sampleàview.jsp)
This is the procedure to
create a new Liferay Project
I will continue about the communication between portlet and jsp in next post
No comments:
Post a Comment