Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. MVC the Liferay way > Configuring the portlet project

4.2. Configuring the portlet project

To make your life easier, you’ll set things up in a way that lets you reuse some configuration going forward. You haven’t had to worry much about this yet, because you’ve only concentrated on the persistence layer so far. But when you first created the project, the Plugins SDK generated a project containing a single portlet with the same name as the project, which you called product-registration. This is a good guess on the Plugins SDK’s part, but it isn’t exactly what you want. Because you’ll be having a Product Registration portlet, you’ll keep that configuration, and you’ll add a new portlet for the Product Admin portlet. You can do this by modifying the deployment descriptors for your project and adding a section for the other portlet you’ll need. The nice thing about this is that you can have two portlets (or more) in one project, which enables you to share common code easily.

Because you’re sharing common code in Java, you may as well do the same for your JSP files. I’ll also show you a pattern Liferay uses in JSP files to share common imports and objects on the page.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial