<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8497974520306283394</id><updated>2026-06-01T12:42:02.210-07:00</updated><category term="liferay"/><category term="Liferay Portal"/><category term="portal"/><category term="structure"/><category term="DXP"/><category term="Liferay dxp"/><category term="MySQL"/><category term="java"/><category term="liferay7"/><category term="maven"/><category term="template"/><category term="Article"/><category term="Category"/><category term="Control Panel"/><category term="Control Panel Portlet"/><category term="DB drop table"/><category term="DB2"/><category term="DDM Structure field"/><category term="Database connection with Liferay"/><category term="Derby"/><category term="Development"/><category term="Drop all sqeuence"/><category term="Drop all tables"/><category term="Hypersonic"/><category term="IPC"/><category term="Ingres"/><category term="JournalArticle"/><category term="MAVEN-37"/><category term="MethodKey"/><category term="MySql Connector"/><category term="OPTION SQL_SELECT_LIMIT=DEFAULT"/><category term="Oracle"/><category term="P6Spy"/><category term="PortalClassInvoker"/><category term="Portlets communication"/><category term="PostgreSQL"/><category term="Public render parameter"/><category term="SAX Parser"/><category term="SQL Server"/><category term="Solr"/><category term="Solr Integration"/><category term="Solr configuration"/><category term="Solr plugin"/><category term="Structure Field"/><category term="Sybase"/><category term="Theme-Dispaly in vm"/><category term="Web Content"/><category term="ajafileupload.js"/><category term="ajax file upload"/><category term="ant"/><category term="ant ecj eclips"/><category term="article content"/><category term="asset-display"/><category term="audio"/><category term="audio-portlet"/><category term="collection"/><category term="connect to another database other then default liferay"/><category term="connect to another datasource"/><category term="control panel category value"/><category term="control panel weight"/><category term="control-panel-entry-category"/><category term="different datasource for portlet service"/><category term="ecj"/><category term="ecj error"/><category term="eclips"/><category term="event IPC"/><category term="ext"/><category term="ext deploy"/><category term="field size"/><category term="file upload in ajax"/><category term="file upload with ajax"/><category term="firebase"/><category term="flowplayer"/><category term="get value from structure field"/><category term="globalScopeGroupid"/><category term="how to create maven portle in liferay."/><category term="import export"/><category term="increase field size"/><category term="iteration of map"/><category term="journal article display"/><category term="journal-article"/><category term="key"/><category term="liferay +svn"/><category term="liferay apps"/><category term="liferay maven porlet"/><category term="liferay mysql error"/><category term="liferay portlet"/><category term="liferay svn"/><category term="liferay-portlet.xml entries for control panel portlet"/><category term="liferay-ui:jounal-article"/><category term="liferay-ui:search-container"/><category term="loop"/><category term="loop for map"/><category term="lr7"/><category term="map"/><category term="maven portlet creation"/><category term="mobile-device"/><category term="mobile-notification"/><category term="model hints"/><category term="model-hints"/><category term="mp3 play"/><category term="notification-to-mobile-from-java"/><category term="oracle drop table"/><category term="override"/><category term="poratl-impl"/><category term="portlet"/><category term="portlet connection with other databse"/><category term="portlet-model-hints"/><category term="scopeGroupId"/><category term="search container"/><category term="search-container"/><category term="service in vm"/><category term="service/util in template"/><category term="set"/><category term="svn"/><category term="svn + eclips"/><category term="svn plugin in eclips"/><category term="table drop"/><category term="tag"/><category term="util in vm"/><category term="value"/><category term="variable in vm"/><category term="web-content"/><category term="web-content-display"/><category term="webcontent"/><title type='text'>Liferay Portal Development</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5544794388397294004</id><published>2017-05-09T02:25:00.000-07:00</published><updated>2017-05-09T02:25:11.279-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="firebase"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile-device"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile-notification"/><category scheme="http://www.blogger.com/atom/ns#" term="notification-to-mobile-from-java"/><title type='text'>Send Notification to Mobile device using java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
This is mobile era. Most of portal have it&#39;s own mobile app. Many time we have situation to access portal data from mobile app using web services. Also need to notify mobile user by notification after processing request successfull. I spend more then a day to find the api and implement to achive this requirement. So here i am sharing how we can send mobile notification from java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public static Response sendAndroidNotification(String deviceToken,String message,String title) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OkHttpClient client = new OkHttpClient();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MediaType mediaType = MediaType.parse(&quot;application/json&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JSONObject obj = new JSONObject();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JSONObject msgObject = new JSONObject();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msgObject.put(&quot;body&quot;, message);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msgObject.put(&quot;title&quot;, title);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // msgObject.put(&quot;icon&quot;, ANDROID_NOTIFICATION_ICON);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msgObject.put(&quot;color&quot;, &quot;#ff0000&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj.put(&quot;to&quot;, deviceToken);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj.put(&quot;notification&quot;,msgObject);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RequestBody body = RequestBody.create(mediaType, obj.toString());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Request request = new Request.Builder().url(FIRE_BASE_SERVER_URL).post(body)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.addHeader(&quot;Content-Type&quot;, &quot;application/json&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.addHeader(&quot;Authorization&quot;, &quot;key=&quot;+SERVER_KEY).build();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response response;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;response = client.newCall(request).execute();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;_log.info( &quot;Response : &quot; + response.body().string());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;return response;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;} catch (IOException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;_log.info(e.getMessage(),e);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Note:&lt;/span&gt;&lt;br /&gt;
FIRE_BASE_SERVER_URL = https://fcm.googleapis.com/fcm/send&lt;br /&gt;
SERVER_KEY = Your app server key. you can find it from firebase portal.&lt;br /&gt;
deviceToken = Your deviceId is generate when you install app. you can find it from firebase portal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is very simple implementation to send notification to mobile device using java.&lt;br /&gt;
&lt;br /&gt;
HTH!!&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
Ketan Savaliya&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5544794388397294004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2017/05/send-notification-to-mobile-device.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5544794388397294004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5544794388397294004'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2017/05/send-notification-to-mobile-device.html' title='Send Notification to Mobile device using java'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-8777443842853426471</id><published>2017-04-18T03:01:00.000-07:00</published><updated>2017-04-18T03:01:11.830-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DXP"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay dxp"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay-ui:search-container"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay7"/><category scheme="http://www.blogger.com/atom/ns#" term="lr7"/><category scheme="http://www.blogger.com/atom/ns#" term="search container"/><category scheme="http://www.blogger.com/atom/ns#" term="search-container"/><category scheme="http://www.blogger.com/atom/ns#" term="tag"/><title type='text'>Liferay7: Changes in search container tag</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Liferay search container is the very common practice for liferay developer to display list of data. So, here is am writing something interesting for search container in liferay new version called Liferay7 or Liferay DXP.&lt;br /&gt;
&lt;br /&gt;
Earlier or older version, we use or setup search container tag like below....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&lt;b&gt;liferay-ui:search-container&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;emptyResultsMessage=&quot;no-users-were-found&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;iteratorURL=&quot;&amp;lt;%= iteratorURL %&amp;gt;&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;b&gt;liferay-ui:search-container-results&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;results=&lt;/b&gt;&quot;&amp;lt;%= UserLocalServiceUtil.getUser(themeDisplay.getUserId()), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %&amp;gt;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;total=&lt;/b&gt;&quot;&amp;lt;%= UserLocalServiceUtil.getUser(themeDisplay.getUserId()).size() %&amp;gt;&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;lt;&lt;b&gt;/liferay-ui:search-container&lt;/b&gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;result &amp;amp; total &lt;/b&gt;attribute are configure in the&amp;nbsp;&lt;b&gt;liferay-ui:search-container-results &lt;/b&gt;tag&lt;b&gt;. &lt;/b&gt;While in DXP version the &lt;b&gt;total&amp;nbsp;&lt;/b&gt;attribute move to the&amp;nbsp;&lt;b&gt;liferay-ui:search-container &lt;/b&gt;tag. So, we just have to&lt;br /&gt;
setup &lt;b&gt;results &lt;/b&gt;attribute into &lt;b&gt;liferay-ui:search-container-results. &lt;/b&gt;Below is the example how we use search container in liferay7 or DXP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&lt;b&gt;liferay-ui:search-container&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;emptyResultsMessage=&quot;no-users-were-found&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;iteratorURL=&quot;&amp;lt;%= iteratorURL %&amp;gt;&quot;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;total=&lt;/b&gt;&quot;&amp;lt;%= UserLocalServiceUtil.getUserCount(themeDisplay.getUserId()) %&amp;gt;&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;b&gt;liferay-ui:search-container-results&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; results=&lt;/b&gt;&quot;&amp;lt;%= UserLocalServiceUtil.getUser(themeDisplay.getUserId()), searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()) %&amp;gt;&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;lt;&lt;b&gt;/liferay-ui:search-container&lt;/b&gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;total &lt;/b&gt;is moved from&amp;nbsp;&lt;b&gt;liferay-ui:search-container-results to&amp;nbsp;&lt;/b&gt;&lt;b&gt;liferay-ui:search-container &lt;/b&gt;tag is only change in search container in Liferay7 or DXP.&lt;br /&gt;
&lt;br /&gt;
HTH!!&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
Ketan Savaliya&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/8777443842853426471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2017/04/liferay7-changes-in-search-container-tag.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8777443842853426471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8777443842853426471'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2017/04/liferay7-changes-in-search-container-tag.html' title='Liferay7: Changes in search container tag'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-3838251942352747954</id><published>2017-03-28T04:47:00.000-07:00</published><updated>2017-03-28T04:47:10.652-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asset-display"/><category scheme="http://www.blogger.com/atom/ns#" term="DXP"/><category scheme="http://www.blogger.com/atom/ns#" term="journal-article"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay dxp"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay7"/><title type='text'>Liferay7 : Removed the liferay-ui:journal-article Tag</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;Hi,&lt;br /&gt;
&lt;br /&gt;
In liferay till version 6.2, Very easy way to display journal article using &lt;b&gt;`liferay-ui:journal-article`.&lt;/b&gt; The &lt;b&gt;`liferay-ui:journal-article`&lt;/b&gt; tag has been removed.&amp;nbsp; Now, You should use the `&lt;b&gt;liferay-ui:asset-display`&lt;/b&gt; tag instead. below is the piece example for how to use it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**Example**&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Old code:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;liferay-ui:journal-article&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; articleId=&quot;&amp;lt;%= article.getArticleId() %&amp;gt;&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;New code:&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;liferay-ui:asset-display&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;className=&quot;&amp;lt;%= JournalArticle.class.getName() %&amp;gt;&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;classPK=&quot;&amp;lt;%= journalArticle.getResourcePrimKey() %&amp;gt;&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;template=&quot;&amp;lt;%= AssetRenderer.TEMPLATE_FULL_CONTENT %&amp;gt;&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HTH!! &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/3838251942352747954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2017/03/liferay7-removed-liferay-uijournal.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3838251942352747954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3838251942352747954'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2017/03/liferay7-removed-liferay-uijournal.html' title='Liferay7 : Removed the liferay-ui:journal-article Tag'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-288352021409347128</id><published>2016-07-29T02:44:00.001-07:00</published><updated>2016-07-29T02:44:58.492-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Control Panel"/><category scheme="http://www.blogger.com/atom/ns#" term="control panel category value"/><category scheme="http://www.blogger.com/atom/ns#" term="Control Panel Portlet"/><category scheme="http://www.blogger.com/atom/ns#" term="control panel weight"/><category scheme="http://www.blogger.com/atom/ns#" term="control-panel-entry-category"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay-portlet.xml entries for control panel portlet"/><title type='text'>Adding a Plugins Portlet to the Liferay Control Panel </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
A &quot;Gotcha!&quot; situation came up when you need to add your custom portlet to the control panel section.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now the important thing is that as a developer you can actually decide which of the items on the left menu are shown. in simple words which section of liferay control panel is display.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Furthermore you can add any custom portlet to the desired place[portal, server, content] in the left menu and make it part of the Control Panel. Custom portlet&#39;s &amp;nbsp;liferay-portlet.xml need some entries to be place your custom portlet at desired place in Control Panel. That is look similar to this:&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
 &lt;span style=&quot;color: #cc0000; font-weight: normal;&quot;&gt;&amp;lt;control-panel-entry-category&amp;gt;portal&amp;lt;/control-panel-entry-category&amp;gt;
 &amp;lt;control-panel-entry-weight&amp;gt;1.0&amp;lt;/control-panel-entry-weight&amp;gt; &lt;/span&gt;&lt;b&gt;   &lt;/b&gt;&lt;b&gt;  &lt;/b&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;=&amp;gt;&lt;/b&gt; The first element determines to which section of the menu will the portlet be added&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;This entry value may be very based on liferay version. here i have given control panel category for Liferay 6.1 and 6.2.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp; &amp;nbsp;1 ) &amp;nbsp;Liferay 6.1 control panel category &lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;values&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;of either &lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;my, content, portal, server&lt;/b&gt;&lt;/span&gt; to place the portlet in the area in the control panel.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #cc0000; font-weight: bold;&quot;&gt;&amp;nbsp; 2) Liferay 6.2 control panel category &lt;/span&gt;&lt;span style=&quot;color: #351c75; font-weight: bold;&quot;&gt;values &lt;/span&gt;is extended from the previous version. possible value listed below.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; For My Account Section : &lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; For Control Panel Section: &lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;users, sites, apps, configuration&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; For Site Administration Section: &lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;site_administration.pages, site_administration.content, site_administration.users, site_administration.configuration&lt;/b&gt;&lt;/span&gt;&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;=&amp;gt;&lt;/b&gt; The second one determines the position. default value is 1.5.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After doing above configuration for your custom portlet, please deploy and check your control panel respected section.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You are done with what all you need to do, Enjoy!!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTH!!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Thanks,&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Ketan Savaliya&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/288352021409347128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/adding-plugins-portlet-to-liferay.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/288352021409347128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/288352021409347128'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/adding-plugins-portlet-to-liferay.html' title='Adding a Plugins Portlet to the Liferay Control Panel '/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-7091806313193035155</id><published>2016-07-28T07:19:00.000-07:00</published><updated>2016-07-28T07:19:36.270-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to create maven portle in liferay."/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay maven porlet"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="maven portlet creation"/><title type='text'>Create liferay service builder portlet using maven tool</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hello LRExpert,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now a days maven as building tool is common practice during development. Lifeary is also support maven tool for building liferay plugin. this article is for those who just start using maven or use maven first to create portlet.&lt;br /&gt;
&lt;br /&gt;
Here i have given steps to create new liferay portlet using maven tool. Please follow simple 11 steps given below.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;1)&lt;/span&gt; Install Maven&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Find specific liferay maven package for liferay version. here in my case i am using &lt;b&gt;liferay-portal- &amp;nbsp; &amp;nbsp; 6.2-ce-ga6&lt;/b&gt;. so, supported liferay maven package is &lt;b&gt;liferay-portal-maven-6.2-ce-ga6.zip&lt;/b&gt;. liferay &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maven package is nothing but just a zip file. &lt;b&gt;unzip that maven package&lt;/b&gt; whenever you want. Insall &amp;nbsp; &amp;nbsp; maven plugin followed by below steps...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Open CMD windows&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Go to directory location where you just unzip file (i.e liferay-portal-maven-6.2-ce-ga6.zip )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Execute command &lt;b&gt;Ant istall&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; - &lt;/b&gt;Wait untill it&#39;s finished execution.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - You are done with you &lt;b&gt;Liferay Maven Plugin Installation.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;2)&lt;/span&gt; &lt;/b&gt;Go to location in CMD window where you need to create liferay maven portlet (suppose d:/lrproject/Source)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;3)&lt;/span&gt;&lt;/b&gt; Execute command : &lt;b&gt;mvn archetype:generate&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; This will display list of maven project which you can create like...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #990000;&quot;&gt;221&lt;/span&gt;: remote -&amp;gt;&lt;span style=&quot;color: #e06666;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-ext-archetype&lt;/span&gt; (Provides an archetype to create Liferay extensions.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;222&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #990000;&quot;&gt;com.liferay.maven.archetypes:liferay-hook-archetype&lt;/span&gt; (Provides an archetype to create Liferay hooks.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;223&lt;/span&gt;: remote -&amp;gt;&lt;span style=&quot;color: #cc0000;&quot;&gt; com.liferay.maven.archetypes:liferay-layouttpl-archetype&lt;/span&gt; (Provides an archetype to create Liferay layout templates.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;224&lt;/span&gt;: remote -&amp;gt;&lt;span style=&quot;color: #cc0000;&quot;&gt; com.liferay.maven.archetypes:liferay-portlet-archetype &lt;/span&gt;(Provides an archetype to create Liferay portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;225&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-icefaces-archetype&lt;/span&gt; (Provides an archetype to create Liferay ICEfaces portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;226&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-jsf-archetype&lt;/span&gt; (Provides an archetype to create Liferay JSF portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;227&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-liferay-faces-alloy-archetype&lt;/span&gt; (Provides an archetype to create Liferay Faces Alloy portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;228&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-primefaces-archetype&lt;/span&gt; (Provides an archetype to create Liferay PrimeFaces portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;229&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-richfaces-archetype&lt;/span&gt; (Provides an archetype to create Liferay RichFaces portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;230&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-portlet-spring-mvc-archetype&lt;/span&gt; (Provides an archetype to create Liferay Spring MVC portlets.)&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;231&lt;/span&gt;&lt;/b&gt;: remote -&amp;gt; &lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;com.liferay.maven.archetypes:liferay-servicebuilder-archetype&lt;/span&gt;&lt;/b&gt; (Provides an archetype to create Liferay Service Builder portlets.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;232&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-theme-archetype&lt;/span&gt; (Provides an archetype to create Liferay themes.)&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;233&lt;/span&gt;: remote -&amp;gt; &lt;span style=&quot;color: #cc0000;&quot;&gt;com.liferay.maven.archetypes:liferay-web-archetype&lt;/span&gt; (Provides an archetype to create Liferay webs.)&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
&lt;span style=&quot;color: #990000; font-weight: bold;&quot;&gt;Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 817:&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt; 231 + Enter &lt;/b&gt;[&lt;/span&gt;Find your liferay plugin type number from above list and enter it as input for above step&lt;span style=&quot;color: #351c75;&quot;&gt;]&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;4)&lt;/span&gt; &lt;/b&gt;After Enter above steps, it&#39;s display liferay version list like...&lt;br /&gt;
&lt;b&gt;Choose com.liferay.maven.archetypes:liferay-servicebuilder-archetype version:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;1: 6.1.0&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2: 6.1.1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;3: 6.1.2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;4: 6.1.10&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;5: 6.1.20&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;6: 6.1.30&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;7: 6.1.30.1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;8: 6.2.0-B1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;9: 6.2.0-B2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;10: 6.2.0-B3&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;11: 6.2.0-M5&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;12: 6.2.0-M6&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;13: 6.2.0-RC1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;14: 6.2.0-RC2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;15: 6.2.0-RC3&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;16: 6.2.0-RC4&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;17: 6.2.0-RC5&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;18: 6.2.0-ga1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;19: 6.2.1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;20: 6.2.2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;21: 6.2.4&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;22: 6.2.5&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;23: 6.2.10.4&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;24: 6.2.10.5&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;25: 6.2.10.6&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;26: 6.2.10.7&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;27: 6.2.10.8&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;28: 6.2.10.9&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;29: 6.2.10.10&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;30: 6.2.10.11&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;31: 6.2.10.12&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;32: 6.2.10.13&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;33: 6.2.10.14&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;34: 6.2.10.15&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;35: 7.0.0-m1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;36: 7.0.0-m2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Choose a number: 36:&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #351c75;&quot;&gt;19 + Enter &lt;/b&gt;[Select liferay version, here i am using 6.2.1 ]&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;5)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Define value for property &#39;groupId&#39;: :&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt; com.liferay.portlet.search&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp;&lt;/b&gt;&amp;nbsp;[project groupid in pom.xml]&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;6)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Define value for property &#39;artifactId&#39;: : &lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;my-search-portlet&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;7)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Define value for property &#39;version&#39;: &amp;nbsp;1.0-SNAPSHOT: :&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;SNAPSHOT-1.0.0&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
[Optional...Enter your&amp;nbsp;preferred&amp;nbsp;project version. Other wise default&amp;nbsp;1.0-SNAPSHOT]&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;8)&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #990000;&quot;&gt;Define value for property &#39;package&#39;: &amp;nbsp;com.liferay.project.search: : &lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;com.liferay.project.search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
[Optional...Enter your&amp;nbsp;preferred&amp;nbsp;package path. Other wise default&amp;nbsp;com.liferay.project.search]&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;9)&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;color: #990000;&quot;&gt;Confirm properties configuration:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;groupId: com.liferay.project.search&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;artifactId: my-search-portlet&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;version: SNAPSHOT-1.0.0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;package: com.liferay.project.search&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Y: : &lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Y [&lt;b&gt;Enter Y for yest, N for no&lt;/b&gt;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;10) &lt;/span&gt;your cmd screen final output is....&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] ----------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Using following parameters for creating project from Archetype: liferay-servicebuilder-archetype:6.2.1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] ----------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: groupId, Value: com.liferay.project.search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: artifactId, Value: my-search-portlet&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: version, Value: SNAPSHOT-1.0.0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: package, Value: com.liferay.project.search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: packageInPathFormat, Value: com/liferay/project/search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: package, Value: com.liferay.project.search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: version, Value: SNAPSHOT-1.0.0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: groupId, Value: com.liferay.project.search&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Parameter: artifactId, Value: my-search-portlet&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] project created from Archetype in dir:&amp;nbsp;d:\lrproject\Source\my-search-portlet&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] ------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] BUILD SUCCESS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] ------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Total time: 25:01 min&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Finished at: 2016-07-28T19:29:27+05:30&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] Final Memory: 16M/229M&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;b&gt;[INFO] ------------------------------------------------------------------------&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b style=&quot;color: #351c75;&quot;&gt;11)&lt;/b&gt; &lt;span style=&quot;color: #990000;&quot;&gt;Enjoy you are Done.&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt; &lt;/span&gt;[your maven service builder portlet is create @&amp;nbsp;d:\lrproject\Source\my-search-portlet]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Veryfirst time you looks it&#39;s long process, but once you have more practice to create liferay plugin. then it&#39;s very easy to create maven project for liferay.&lt;br /&gt;
&lt;br /&gt;
Hope this Help!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Ketan Savaliya&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/7091806313193035155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/create-liferay-service-builder-portlet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7091806313193035155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7091806313193035155'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/create-liferay-service-builder-portlet.html' title='Create liferay service builder portlet using maven tool'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-2994009739883883778</id><published>2016-07-28T06:16:00.000-07:00</published><updated>2016-07-28T06:17:34.953-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Article"/><category scheme="http://www.blogger.com/atom/ns#" term="article content"/><category scheme="http://www.blogger.com/atom/ns#" term="DDM Structure field"/><category scheme="http://www.blogger.com/atom/ns#" term="get value from structure field"/><category scheme="http://www.blogger.com/atom/ns#" term="JournalArticle"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="SAX Parser"/><category scheme="http://www.blogger.com/atom/ns#" term="structure"/><category scheme="http://www.blogger.com/atom/ns#" term="Structure Field"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Content"/><title type='text'>Get value from Structure Field for Journal Article/Web Content in Liferay.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
During your liferay development, many time you need get value from DDM Structure field. So, here i have piece of code which gives you value of structure field for journal article/ web content.&lt;br /&gt;
&lt;br /&gt;
Suppose you have article content field data(from JournalArticle table) something like (Mention only one field for example.)...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;lt;root available-locales=&quot;en_US&quot; default-locale=&quot;en_US&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dynamic-element &lt;span style=&quot;color: #cc0000;&quot;&gt;name=&quot;country&quot;&lt;/span&gt; type=&quot;text&quot; index-type=&quot;&quot;&lt;span style=&quot;color: #cc0000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;index=&quot;0&quot;&lt;/span&gt; instance-id=&quot;Page_Title&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;dynamic-content language-id=&quot;en_US&quot;&amp;gt;&amp;lt;![CDATA[India]]&amp;gt;&amp;lt;/dynamic-content&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/dynamic-element&amp;gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;lt;/root&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then your code to get value of country field is like...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;JournalArticle article =&amp;nbsp;JournalArticleLocalServiceUtil.getArticle(...);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Document document = SAXReaderUtil.read(article.getContent());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Node node = document.selectSingleNode(&quot;&lt;span style=&quot;color: #cc0000;&quot;&gt;/root/dynamic-element[@name=&#39;country&#39;]/dynamic-content&lt;/span&gt;&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;String country =&amp;nbsp;node.getText();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
if you have multiple field then your code looks like...(Suppose your field have two times as repeated field )&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) Access first element value is....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Node node = document.selectSingleNode(&quot;&lt;span style=&quot;color: #cc0000;&quot;&gt;/root/dynamic-element[@name=&#39;country&#39;&amp;nbsp;and @&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;index=&#39;0&#39;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;]/dynamic-content&lt;/span&gt;&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;String country =&amp;nbsp;node.getText()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;2) Access second element value is....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Node node = document.selectSingleNode(&quot;&lt;span style=&quot;color: #cc0000;&quot;&gt;/root/dynamic-element[@name=&#39;country&#39;&amp;nbsp;and @&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;index=&#39;1&#39;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;]/dynamic-content&lt;/span&gt;&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;String country =&amp;nbsp;node.getText()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;HTH...!!!&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Thanks,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Ketan Savaliya&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/2994009739883883778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/get-value-from-structure-field-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/2994009739883883778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/2994009739883883778'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/get-value-from-structure-field-for.html' title='Get value from Structure Field for Journal Article/Web Content in Liferay.'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-3832794472593392180</id><published>2016-07-28T04:19:00.000-07:00</published><updated>2016-07-28T06:16:24.987-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay mysql error"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="MySql Connector"/><category scheme="http://www.blogger.com/atom/ns#" term="OPTION SQL_SELECT_LIMIT=DEFAULT"/><title type='text'>Liferay MySQL Error &#39;option sql_select_limit=default&#39; at line 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
Hello LRDeveloper,&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sometime when you setup your fresh tomcat even you start first time with you mysql db, you got error something like...&amp;nbsp;&lt;b&gt;&lt;span style=&quot;background-color: white; color: #4c4c4e; font-family: , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;OPTION SQL_SELECT_LIMIT=DEFAULT&#39; at line&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4c4c4e; font-family: , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #4c4c4e; font-family: , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
This is nothing more complex but problem with your &lt;b&gt;tomcat\lib\ext\mysql.jar&lt;/b&gt; file. just download update version of mysql connector jar and replace it with old tomcat\lib\ext\mysql.jar. make sure your new file have name like &lt;b&gt;mysql.jar &lt;/b&gt;only.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTH and save you valuable time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;NOTE:&lt;/span&gt; above solution is worked for me if i update mysql connector with &lt;b&gt;&quot;mysql-connector-java-5.1.6.jar&quot;&lt;/b&gt; version and rename it with mysql.jar. &lt;b&gt;Liferay &lt;/b&gt;version i am using&amp;nbsp;&lt;b&gt;6.1.20&lt;/b&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Thank you!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Ketan Savaliya&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/3832794472593392180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/liferay-mysql-error-option.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3832794472593392180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3832794472593392180'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/liferay-mysql-error-option.html' title='Liferay MySQL Error &#39;option sql_select_limit=default&#39; at line 1'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-7545329115578635082</id><published>2016-07-22T07:16:00.000-07:00</published><updated>2016-07-28T07:31:59.638-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="field size"/><category scheme="http://www.blogger.com/atom/ns#" term="increase field size"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="MAVEN-37"/><category scheme="http://www.blogger.com/atom/ns#" term="model hints"/><category scheme="http://www.blogger.com/atom/ns#" term="model-hints"/><category scheme="http://www.blogger.com/atom/ns#" term="override"/><category scheme="http://www.blogger.com/atom/ns#" term="portlet-model-hints"/><title type='text'>Maven ServiceBuilder stop override portlet-model-hints.xml with lifeary</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hello Liferay Experts,&lt;br /&gt;
&lt;br /&gt;
Here i am sharing some important liferay + maven information. which i got after spending my more then half day, it may help you as well.&lt;br /&gt;
&lt;br /&gt;
This is helpful for those who are working with liferay 6.1 + service builder &amp;nbsp;+ maven build tool. some time you need to change DB field size rather then default size which generate from service builder code.&lt;br /&gt;
&lt;br /&gt;
Obviously liferay expert very well know to change &amp;nbsp;&lt;i style=&quot;font-weight: bold;&quot;&gt;portlet-model-hints.xml&amp;nbsp; &lt;/i&gt;to increase filed size&lt;i style=&quot;font-weight: bold;&quot;&gt;.&lt;/i&gt;&amp;nbsp;if you don&#39;t know about that then this is importance for you, you need to change that file. it&#39;s famous and well known problem with maven is overriding your&amp;nbsp;&lt;em&gt;portlet-model-hints.xml&lt;/em&gt;&amp;nbsp;everytime while you build service. please check&amp;nbsp;&lt;a href=&quot;https://issues.liferay.com/browse/MAVEN-37&quot;&gt;MAVEN-37&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;https://issues.liferay.com/browse/LPS-10607&quot;&gt;LPS-10607&lt;/a&gt;&amp;nbsp;links for reporting @ liferay.&lt;br /&gt;
&lt;br /&gt;
Due to this you want be able to change your filed size because if you change that file and getting that reflect you need service build. as i said earlier service build is again override your changes if you do build service. to overcome/resolve this issue here i come up with workaround and few step to follow....&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;Your maven portlet &lt;b&gt;parent pom.xml &lt;/b&gt;configure  the &lt;b&gt;liferay maven plugin for version 6.1.30&lt;/b&gt; like &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bellow...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;lt;build&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;plugins&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;com.liferay.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;             &amp;lt;artifactId&amp;gt;liferay-maven-plugin&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; white-space: normal;&quot;&gt;6.1.30&lt;/span&gt;&amp;lt;/version&amp;gt;&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;             .....&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;        &amp;lt;/plugin&amp;gt;
     &amp;lt;/plugins&amp;gt;
   &amp;lt;/build&amp;gt;&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
2. Maven portlet &lt;b&gt;parent pom.xml&lt;/b&gt; also have entry in&lt;b&gt; dependency &lt;/b&gt;for above liferay maven plugin.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;com.liferay.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;liferay-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;6.1.30&amp;lt;/version&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Make sure maven porlet &lt;b&gt;all three pom.xml&lt;/b&gt;&amp;nbsp;refer the &lt;b&gt;same configuration version&amp;nbsp;&lt;/b&gt;of liferay maven &amp;nbsp; &amp;nbsp; plugin. suppose you have maven portlet name &lt;b&gt;portlet-test &lt;/b&gt;then check below files&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;-porlet-test/pom.xml&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; -porlet-test/portlet-test-porlet/pom.xml&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; -porlet-test/portlet-test-portlet-service/pom.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
4. Update&amp;nbsp;&lt;i style=&quot;font-weight: bold;&quot;&gt;portlet-model-hints.xml &lt;/i&gt;with your required changes something like&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;lt;field name=&quot;message&quot; type=&quot;String&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;&amp;lt;hint-collection name=&quot;TEXTAREA&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/field&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
5. Rebuild service.xml and deploy porlet then check your DB table wether your changes get reflect or &amp;nbsp; &amp;nbsp; not. i am sure yes it is.&lt;br /&gt;
&lt;br /&gt;
6. Make smiley face.....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this save someone development time and make them relax...!!&lt;br /&gt;
&lt;br /&gt;
Thank you.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;NOTE :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
I am working with maven 6.1.2 and liferay 6.1.2 and above solution is perfectly working fine with mentioned version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Ketan Savaliya&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/7545329115578635082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/maven-servicebuilder-stop-override.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7545329115578635082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7545329115578635082'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2016/07/maven-servicebuilder-stop-override.html' title='Maven ServiceBuilder stop override portlet-model-hints.xml with lifeary'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-4620208937579957580</id><published>2015-08-02T04:38:00.000-07:00</published><updated>2015-08-02T04:58:44.723-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajafileupload.js"/><category scheme="http://www.blogger.com/atom/ns#" term="ajax file upload"/><category scheme="http://www.blogger.com/atom/ns#" term="file upload in ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="file upload with ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><title type='text'>Upload file with ajax - Liferay </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In developer life, to stuck at any point is routine. here is one of the point i am sharing where many of us stuck and it&#39;s take lot more times to come out with solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Scenario: &lt;/b&gt;upload file with Ajax.&lt;br /&gt;
Some time we need to upload(by file) some data and process them. but after finished data process page doesn&#39;t refreshed. to achieve this we defiantly use Ajax. so, generally we giving &amp;lt;portlet:resourceURL&amp;gt; in form action. form which include input file object. here in this case, if we submit the form and try to get uploaded file in liferay controller. it&#39;s doesn&#39;t work because of ajax. your serverResource() of&amp;nbsp; portlet controller is not able to fetch file object from request. because ajax request generally we are passing String &amp;amp; Number data. but this is File so ajax can not handle this tyep of data. after trying more and giving lot more time to resolve this. i found resolution that what i am going to share here....&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Here is what you need to do...&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;1)&lt;/span&gt; &lt;u&gt;JSP contains input-file (With or Without Form)&lt;/u&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&lt;a href=&quot;https://sites.google.com/site/liferaycomponent/ajaxfileupload&quot;&gt;/XYZ-porlet/js/ajaxfileupload.js&lt;/a&gt;&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;&amp;lt;portlet:resourceURL var=&quot;fileImportURL&quot; id=&quot;fileImport&quot;&amp;gt;&amp;lt;/portlet:resourceURL&amp;gt;&lt;/i&gt; &lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;lt;input id=&quot;fileUpload&quot; name=&quot;file&quot; type=&quot;file&quot;&amp;nbsp; accept=&quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel&quot;/&amp;gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;lt;input type=&quot;button&quot; name=&quot;upload&quot; id=&quot;upload&quot; value=&quot;Upload&quot; onclick=&quot;ajaxFileUpload()&quot; /&amp;gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;2)&lt;b&gt; &lt;u&gt;Write JS for AJAX&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;function ajaxFileUpload(){&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;$.ajaxFileUpload&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; secureuri : false,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fileElementId : &#39;fileUpload&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; data: {name: &#39;Ketan&#39;},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: &#39;&amp;lt;%&lt;i&gt;=fileImportURL&lt;/i&gt;%&amp;gt;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success: function (data, status)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;File upload success&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; error: function (data, status, e) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;File upload faile&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; return false;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
}&lt;/h3&gt;
&lt;h3&gt;
&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
3) &lt;u&gt;serveResource() of Liferay Controlle&lt;/u&gt;r&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;UploadPortletRequest uploadRequest&amp;nbsp;&amp;nbsp; =&amp;nbsp; PortalUtil.getUploadPortletRequest(resourceRequest);&lt;br /&gt;File file = uploadRequest.getFile(&quot;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;fileUpload&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&quot;);&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;That&#39;s all enough to do for ajax file upload. Enjoy!!&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;https://sites.google.com/site/liferaycomponent/ajaxfileupload&quot;&gt;Click Here&lt;/a&gt; to download required js file.&amp;nbsp; &lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/4620208937579957580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2015/08/in-developer-life-to-stuck-at-any-point.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/4620208937579957580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/4620208937579957580'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2015/08/in-developer-life-to-stuck-at-any-point.html' title='Upload file with ajax - Liferay '/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-3866088460579684137</id><published>2014-09-27T05:56:00.000-07:00</published><updated>2014-09-27T05:58:26.281-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Category"/><category scheme="http://www.blogger.com/atom/ns#" term="Development"/><category scheme="http://www.blogger.com/atom/ns#" term="import export"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay apps"/><category scheme="http://www.blogger.com/atom/ns#" term="portal"/><title type='text'>Liferay Category Import Export Apps on Liferay Market Place</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here i am sharing one more my work experience to liferay community.&lt;br /&gt;
&lt;br /&gt;
I hope this may help to many liferay developer during development. it&#39;s about import/export functionality of Category.&lt;br /&gt;
&lt;br /&gt;
Many time we need create long list of categories. Once we create all categories structure to particular community or organization then we want to copy whole structure to another community or another server. Currently we don&#39;t have any option doing this easily within few clicks. Again we need rework all categories entry.&lt;br /&gt;
&lt;br /&gt;
So, here i come up with solution. I created App for that which is use to import/export category list from or to liferay community or organization. &lt;br /&gt;
&lt;br /&gt;
Here you can find my liferay apps from Liferay market place &lt;a href=&quot;https://www.liferay.com/marketplace/-/mp/application/27078617?_7_WAR_osbportlet_backURL=%2Fweb%2Fketan6465%2Fprofile&quot;&gt; &lt;b&gt;Liferay Category Import-Export App&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/3866088460579684137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2014/09/liferay-category-import-export-apps-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3866088460579684137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3866088460579684137'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2014/09/liferay-category-import-export-apps-on.html' title='Liferay Category Import Export Apps on Liferay Market Place'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-331959549488749435</id><published>2013-10-10T01:40:00.000-07:00</published><updated>2013-10-10T01:52:55.339-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="Solr"/><category scheme="http://www.blogger.com/atom/ns#" term="Solr configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="Solr Integration"/><category scheme="http://www.blogger.com/atom/ns#" term="Solr plugin"/><title type='text'>Solr Configuration With Liferay</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hi Liferay Mastreo,&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Solr Configuration with lifeary is so easy. here i describable&amp;nbsp; the steps which i follow for solr configuration with liferay 6.0.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Download Solr let-test version from &lt;a href=&quot;http://lucene.apache.org/solr/downloads.html&quot;&gt;here&lt;/a&gt;...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) Download Apache let-test tomcat for solr (&lt;i&gt;separate from liferay tomcat&lt;/i&gt;) from &lt;a href=&quot;http://tomcat.apache.org/download-60.cgi&quot;&gt;here&lt;/a&gt;...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3) Unzip .tar/.zip file of Solr which you downloaded version(&lt;i&gt;in step 1&lt;/i&gt;) on your prefered location (&lt;i&gt;ex. D:/Solr&lt;/i&gt;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
4) Unzip .tar/.zip file of Solr tomcat which you downloaded version(&lt;i&gt;in step 2&lt;/i&gt;)on your preferred location (&lt;i&gt;ex. D:/tomcat&lt;/i&gt;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Configuration Solr with tomcat instance&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
5) apache-solr-1.4.0.war : copy this file from solr dist directory (here D:/Solr/dist) and past into /example/solr(&lt;i&gt;here D:/Solr/example/solr&lt;/i&gt;) directory.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
6) Configure Solr data directory path into solrconfig.xml (&lt;i&gt;D:/Solr/exmple/solr/conf/solrconfig.xml&lt;/i&gt;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; - Create directory called data into /example/solr/ (&lt;i&gt;here D:/Solr/example/solr&lt;/i&gt;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; - find &amp;lt;dataDir&amp;gt; tag update path of data directory&amp;nbsp; in ${solr.data.dir:DATA_PATH}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt; (here DATA_PATH in our case D:/Solr/example/solr/data so ${solr.data.dir:D:/Solr/example/solr/data})&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
7) Create solr.xml into D:/tomcat/tomcat****/conf/Catalina/localhost with below content...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Context docBase=&quot;SOLR_WAR_PATH&quot; debug=&quot;0&quot; crossContext=&quot;true&quot;&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Environment name=&quot;solr/home&quot; type=&quot;java.lang.String&quot; value=&quot;SOLR_HOME_PATH&quot; override=&quot;true&quot;/&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Context&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;( here,&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; SOLR_WAR_PATH is D:/Solr/example/solr/apache-solr-1.4.0.war&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; SOLR_HOME_PATH is D:/Solr/example/solr)&lt;/i&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
8) Now start Solr tomcat from D:/tomcat/tomcat****/bin&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
9) After start successful of tomcat open solr server in your browser with this link&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; http://localhost:port/solr (&lt;i&gt;ex http://localhost:8081/solr&lt;/i&gt;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; If you seen &quot;Welcome to Solr!&quot; screen with &quot;Solr Admin&quot; link then congratulation solr&amp;nbsp;&amp;nbsp; configuration is done successfully.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Integration/Configuration of Solr plug-in with liferay&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Download solr-plugin war file for liferay supported version from &lt;a files=&quot;&quot; href=&quot;http://sourceforge.net/projects/lportal/files/Liferay%20Plugins/&quot; hrefhttp:=&quot;&quot; iferay=&quot;&quot; lportal=&quot;&quot; lugins=&quot;&quot; projects=&quot;&quot; sourceforge.net=&quot;&quot;&gt;here &lt;/a&gt;... &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) Put solr-plugin war file into &quot;$LIFERAY_HOME/deploy&quot; directory&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3) Start Liferay tomcat to deploy solr plugin into portal.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
4) Once liferay tomcat start successful. then stop both liferay tomcat and solr tomcat instance&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt; NOTE: Now liferay webapps contain &quot;/solr-web&quot; directory&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
5) Open solr-spring.xml from the $LIFERAY_HOME/tomcat/webapps/solr-web/WEB-INF/classes/META-INF&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
6) Find string {class=&quot;com.liferay.portal.search.solr.server.BasicAuthSolrServer&quot;} which is in one of &amp;lt;bean&amp;gt; entry.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
7) Inside that &amp;lt;bean&amp;gt; chagne the value as &quot;solr_url&quot; in value attribute of &amp;lt;constructor-arg /&amp;gt;&amp;nbsp;&amp;nbsp; e.g. &amp;lt;constructor-arg type=”java.lang.String” value=”http://localhost:8081/solr” /&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
8) Replace solr instance schema.xml copy from $LIFERAY_HOME/tomcat/webapps/solr-web/WEB-INF/conf/schema.xml&amp;nbsp; and paste into $SOLR_HOME/exmple/solr/conf &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Finally you have done with configuration of solr with Liferay.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Now, Let&#39;s confirm weather is it correct configuration or wrong?&amp;nbsp; by follow below steps.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Open Solr tomcat instance first then liferay tomcat instance&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) Goto control_panel -&amp;gt; server administartion-&amp;gt; reindex all data from here&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3) Look into solr tomcat server log : solr log change during reindexe from liferay server&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp; if it&#39;s change it means solr configuration is perfect.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
That&#39;s it.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Enjoy with Solr!!&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Note&lt;/span&gt;:&lt;/u&gt; here solr tomcat port is change to 8081 because both server not start at same time with same port number. you can change according to that.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/331959549488749435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/10/solr-configuration-with-liferay.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/331959549488749435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/331959549488749435'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/10/solr-configuration-with-liferay.html' title='Solr Configuration With Liferay'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-1018856157378417930</id><published>2013-08-23T06:17:00.000-07:00</published><updated>2013-08-23T06:22:29.525-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ant"/><category scheme="http://www.blogger.com/atom/ns#" term="ant ecj eclips"/><category scheme="http://www.blogger.com/atom/ns#" term="ecj"/><category scheme="http://www.blogger.com/atom/ns#" term="ecj error"/><title type='text'>ECJ Error : Task cannot continue because ECJ is not installed.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi all,&lt;br /&gt;
&lt;br /&gt;
Many of java developer use ANT build tool for his project build process. many of us we got this kind of error. so, here i the solution to resolve this.&lt;br /&gt;
&lt;br /&gt;
Please follow below steps...&lt;br /&gt;
1) Download ecj.jar file from&amp;nbsp; this link&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;http://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj/3.5.1&quot;&lt;br /&gt;
2)&amp;nbsp; Goto the&amp;nbsp;&amp;nbsp; &lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;b id=&quot;aui_3_2_0_11002&quot;&gt;&lt;span id=&quot;aui_3_2_0_11001&quot; style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;Window&lt;/span&gt;&lt;/b&gt; -&amp;gt; &lt;b&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;Preferences&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (this will display popup windos)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;3)&amp;nbsp; Click On &lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;b&gt;Ant&lt;/b&gt;&lt;/span&gt;&amp;nbsp; &lt;b&gt;-&amp;gt; &lt;/b&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;b&gt;Runtime&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;4) Click on &lt;b&gt;Classpath&lt;/b&gt; tab&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;5) Select &lt;b&gt;Ant Home Entries (Default) &lt;/b&gt;option&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;6) Click on &lt;b&gt;Add External JARs.. &lt;/b&gt;button&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;7) Select Downloaded file from directory -&amp;gt; open&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;8) Click on Ok&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;Now, build your project again with ant command. i am sure you will not get this error again.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;That&#39;s it!!&lt;br /&gt;Enjoy the code!!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;Thank you,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;aui_3_2_0_1991&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: &#39;lucida grande&#39;, sans-serif;&quot;&gt;Ketan Savaliya&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/1018856157378417930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/ecj-error-task-cannot-continue-because.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/1018856157378417930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/1018856157378417930'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/ecj-error-task-cannot-continue-because.html' title='ECJ Error : Task cannot continue because ECJ is not installed.'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5899711594948886498</id><published>2013-08-23T05:59:00.000-07:00</published><updated>2013-08-23T06:00:00.296-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="collection"/><category scheme="http://www.blogger.com/atom/ns#" term="iteration of map"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="key"/><category scheme="http://www.blogger.com/atom/ns#" term="loop"/><category scheme="http://www.blogger.com/atom/ns#" term="loop for map"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="set"/><category scheme="http://www.blogger.com/atom/ns#" term="value"/><title type='text'>Map Iterator/loop  in java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Many time some little things goes our of our mind. Same thing happen in developer life also.So, here i am going to write a small piece of java code which is used daily routine.&lt;br /&gt;
&lt;br /&gt;
Here i am talking about Collection framework&lt;b&gt; Iteration of MAP&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
When ever developer need Map almost all time they go to google for how to iterate MAP? so, ans for this question i am going to write small blog about MAP iteration. Bellow is the example for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;About Map :&lt;/b&gt;&lt;/u&gt; Map is part of collection framework. Mainly use to store data in key,value manner. Given a key and a value, you can store the value in a Map object. After 
the value is stored, you can retrieve it by using its key. now we go through step by step how to use MAP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;1) Declaration of MAP&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String,String&amp;gt; stringMap = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;2) Store data into MAP&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;1&quot;,&quot;Apple&quot; );&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;2&quot;,&quot;Ball&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;3&quot;,&quot;Cat&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;3) Iteration/Loop/Use of MAP&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
There are so many ways you can iterate MAP in java. but here i am going to simple way to iterate MAP in java as per my knowledge. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - by Iterator&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - by EnterySet&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - by keySet&lt;br /&gt;
&lt;br /&gt;
Here we use keySet to iterator MAP. this is very simple way as per my development experiance. like...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(String key : stringMap.keySet()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Key : &quot; + key + &quot;, Value : &quot; + stringMap.get(key) );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;4) Exmaple&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.Collections;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class test {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] s){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String,String&amp;gt; stringMap = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;3&quot;,&quot;Cat&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;1&quot;,&quot;Apple&quot; );&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; stringMap.put(&quot;2&quot;,&quot;Ball&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(String key : stringMap.keySet()){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;Key : &quot; + key + &quot;, Value : &quot; + stringMap.get(key) );&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;5) Output&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Key : 3, Value : Cat&lt;br /&gt;
Key : 2, Value : Ball&lt;br /&gt;
Key : 1, Value : Apple&lt;br /&gt;
&lt;br /&gt;
It&#39;s simple right? still we have to go googling for every time to iterate map. i ma sure this blog visit help you remember iteration of map.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it!!&lt;br /&gt;
&lt;br /&gt;
Enjoy the code!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
&amp;nbsp;Ketan Savaliya &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5899711594948886498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/map-iteratorloop-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5899711594948886498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5899711594948886498'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/map-iteratorloop-in-java.html' title='Map Iterator/loop  in java'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-4777036865790839778</id><published>2013-08-06T03:35:00.000-07:00</published><updated>2013-08-06T03:35:10.255-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="journal article display"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay-ui:jounal-article"/><category scheme="http://www.blogger.com/atom/ns#" term="portal"/><category scheme="http://www.blogger.com/atom/ns#" term="portlet"/><category scheme="http://www.blogger.com/atom/ns#" term="web-content"/><category scheme="http://www.blogger.com/atom/ns#" term="web-content-display"/><title type='text'>Web content data display in custom-portlet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Many more time during development we need display liferay web-content in our custom-portlet.&lt;br /&gt;
Liferay taglib already give tag to display web-content data.&lt;br /&gt;
&lt;br /&gt;
Here is syntax for &quot;&lt;b&gt;&amp;lt;liferay-ui:journal-article/&amp;gt;&lt;/b&gt;&quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;liferay-ui:journal-article showTitle=&quot;true/false&quot; articleId=&quot;longArticleId&quot; groupId=&quot;longGroupId&quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
Let take an example... &lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;liferay-ui:journal-article showTitle=&quot;false&quot; articleId=&quot;&amp;lt;%= journalArticleId%&amp;gt;&quot;&lt;br /&gt; groupId=&quot;&amp;lt;%= themeDisplay.getScopeGroupId() %&amp;gt;&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here&lt;i&gt; journalArticleId &lt;/i&gt;is long var which is articelId of web-content&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/4777036865790839778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/web-content-data-display-in-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/4777036865790839778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/4777036865790839778'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/08/web-content-data-display-in-custom.html' title='Web content data display in custom-portlet'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5472826999039636483</id><published>2013-07-08T00:31:00.000-07:00</published><updated>2013-07-08T00:31:29.220-07:00</updated><title type='text'>Sorting (Case insensitive) using Custom Comparator in Liferay</title><content type='html'>&lt;div id=&quot;cke_pastebin&quot;&gt;
 Search Container is widely used taglib in Liferay.&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 We will follow few steps to implement ordering on container columns&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &lt;b&gt;1) Write below code in your jsp .&lt;/b&gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;%&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 String orderByCol = ParamUtil.getString(renderRequest, &quot;orderByCol&quot;);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 String orderByType = ParamUtil.getString(renderRequest, &quot;orderByType&quot;);&amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 /* Code to set default arrow on particular column while landing on this page */&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 PortalPreferences portalPrefs = PortletPreferencesFactoryUtil.getPortalPreferences(request);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 if (Validator.isNotNull(orderByCol) &amp;amp;&amp;amp; Validator.isNotNull(orderByType)) {&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 portalPrefs.setValue(&quot;DemoName&quot;, &quot;DemoName-order-by-col&quot;, orderByCol);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 portalPrefs.setValue(&quot;DemoName&quot;, &quot;DemoName-order-by-type&quot;, orderByType);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 } else {&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 orderByCol = portalPrefs.getValue(&quot;DemoName&quot;, &quot;DemoName-order-by-col&quot;, &quot;keyProperty&quot;);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 orderByType = portalPrefs.getValue(&quot;DemoName&quot;, &quot;DemoName-order-by-type&quot;, &quot;desc&quot;);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 }&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 /* Code to convert asc in desc after clicking on cloumn */&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 if(orderByCol==null || orderByCol.equals(StringPool.BLANK)) {&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 renderRequest.setAttribute(&quot;orderByCol&quot;,&quot;keyProperty&quot;);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 }&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 if(orderByType==null || orderByType.equals(StringPool.BLANK)) {&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 orderByType=&quot;desc&quot;;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 renderRequest.setAttribute(&quot;orderByType&quot;,orderByType);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 }&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 %&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &lt;b&gt;2) Pass Custom comparator to your search container results.&lt;/b&gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;liferay-ui:search-container orderByCol=&quot;&amp;lt;%=orderByCol %&amp;gt;&quot; 
orderByType=&quot;&amp;lt;%=orderByType %&amp;gt;&quot; &amp;nbsp;iteratorURL=&quot;&amp;lt;%=iteratorURL 
%&amp;gt;&quot; &amp;nbsp;delta=&#39;10&#39;&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;liferay-ui:search-container-results&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;%&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 List&amp;lt;YourModel&amp;gt; lst = lst; //Fetch List for sorting purpose;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 if(lst!=null){&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 Collections.sort(lst,DemoComparatorUtil.getDemoComparator(orderByType, orderByCol)); //Pass custom comparator for sorting&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 total = lst.size();&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 results = ListUtil.subList(lst, searchContainer.getStart(), searchContainer.getEnd());&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 pageContext.setAttribute(&quot;results&quot;, results);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 pageContext.setAttribute(&quot;total&quot;, total);&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 }&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 %&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;/liferay-ui:search-container-results&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 .&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 .&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 .&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;lt;/liferay-ui:search-container&amp;gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &lt;b&gt;3) Now create custom comparator mentioned above &quot;DemoComparator&quot; :&lt;/b&gt;&lt;/div&gt;
&lt;div id=&quot;cke_pastebin&quot;&gt;
 &amp;nbsp;&lt;/div&gt;
public class DemoComparatorUtil {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static DemoComparator getDemoComparator(String orderByType,String orderByCol){&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;DemoComparator demoComparator;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (orderByType.equals(&quot;desc&quot;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;demoComparator = new DemoComparator(false, false);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;demoComparator = new DemoComparator(true, false);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (orderByCol != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;demoComparator.addOrderBy(orderByCol);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return demoComparator;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;class DemoComparator implements Comparator&amp;lt;YourModel&amp;gt;, Serializable{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private boolean asc;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private boolean caseSensitive;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private List&amp;lt;DocumentComparatorOrderBy&amp;gt; columns = new ArrayList&amp;lt;DocumentComparatorOrderBy&amp;gt;();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public DemoComparator(){&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this(true,false);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public DemoComparator(boolean asc, boolean caseSensitive) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.asc = asc;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;this.caseSensitive = caseSensitive;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void addOrderBy(String name) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;addOrderBy(name, asc, caseSensitive);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void addOrderBy(String name, boolean asc, boolean caseSensitive) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DocumentComparatorOrderBy orderBy = new DocumentComparatorOrderBy(name, asc, caseSensitive);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;columns.add(orderBy);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public int compare(YourModel arg0, YourModel arg1) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;int result=0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (DocumentComparatorOrderBy orderBy : columns) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;String value1 = &quot;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;String value2 = &quot;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (orderBy.getName().equals(&quot;keyProperty&quot;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!orderBy.isAsc()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;String temp = value1;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;value1 = value2;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;value2 = temp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if ((value1 != null) &amp;amp;&amp;amp; (value2 != null)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (orderBy.isCaseSensitive()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;result = value1.compareTo(value2);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;result = value1.compareToIgnoreCase(value2);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (result != 0) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return result;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can use this single comparator for all columns in your search container by checking key property in if-else condition only.&lt;br /&gt;Enjoy..!!</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5472826999039636483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/07/sorting-case-insensitive-using-custom.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5472826999039636483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5472826999039636483'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/07/sorting-case-insensitive-using-custom.html' title='Sorting (Case insensitive) using Custom Comparator in Liferay'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5507846879885055078</id><published>2013-07-08T00:18:00.001-07:00</published><updated>2013-07-08T00:22:29.169-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="event IPC"/><category scheme="http://www.blogger.com/atom/ns#" term="IPC"/><category scheme="http://www.blogger.com/atom/ns#" term="Portlets communication"/><category scheme="http://www.blogger.com/atom/ns#" term="Public render parameter"/><title type='text'> IPC (Inter Portlet Communication) - in Liferay.</title><content type='html'>Hi Liferay Developers,&lt;br /&gt;
&lt;br /&gt;
Liferay have so many good feature. IPC is one of them. let me give basic idea about IPC. Basically &lt;br /&gt;
IPC is use for Inter Portlet Communication between portlets.&lt;br /&gt;
&lt;br /&gt;
IPC can be achieved in two ways:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) Public-render-parameter &lt;br /&gt;2) Event-definition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;1) &lt;u&gt;Public Render Parameter&lt;/u&gt;&lt;u&gt; - IPC&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Adding below property in portlet-ext, we can enable portlets to share render states with other portlets that are on different pages:&lt;br /&gt;
&lt;br /&gt;
Changes in portal-ext.properties:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;portlet.public.render.parameter.distribution=ALL_PORTLETS&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes in Pitcher Portlet&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Add below attribute in Pitcher Portlet in portlet.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;portlet-app&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supported-public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/supported-public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;identifier&amp;gt;name&amp;lt;/identifier&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:x=&quot;http://ktn.com/anything&quot;&amp;gt;x:param1&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/public-render-parameter&amp;gt;&lt;br /&gt;
&amp;lt;/portlet-app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Note:&lt;/span&gt; http://ktn.com/anything is userdefine url which you like. i.e. http://testorganizationcom/name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 2:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Set render parameter in the processAction() method from the Pitcher Portlet.&lt;br /&gt;
&lt;br /&gt;
public void processAction(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ActionRequest request, ActionResponse response)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throws IOException, PortletException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;u&gt; response.setRenderParameter(&quot;name&quot;, &quot;value&quot;);&lt;/u&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Changes Catcher Portlet in portlet.xml, defines which render parameter is shared in portlet section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;portlet-app&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supported-public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/supported-public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;public-render-parameter&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;identifier&amp;gt;name&amp;lt;/identifier&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:x=&quot;http://ktn.com/anything&quot;&amp;gt;x:param1&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/public-render-parameter&amp;gt;&lt;br /&gt;
&amp;lt;/portlet-app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Portlet can read public render parameter using from the Catcher Portlet:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;request.getPublicParameterMap()&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
or can also be read using&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;request.getParameter(“name”);&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;2) &lt;u&gt;Event : IPC&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Adding below property in portlet-ext, we can enable portlets to share Even states with other portlets.&lt;br /&gt;
&lt;br /&gt;
Changes in portal-ext.properties:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;portlet.event.distribution=ALL_PORTLETS&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes in Pitcher Portlet&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Adding attribute in Pitcher Portlet in portlet.xml&lt;br /&gt;
&lt;br /&gt;
This is defines supported-publishing from the pitcher portlet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;portlet-app&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supported-publishing-event&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:t=&quot;http://liferay.com/events&quot;&amp;gt;t:name&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/supported-publishing-event&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/portlet&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;event-definition&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:t=&quot;http://liferay.com/events&quot;&amp;gt;t:name&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value-type&amp;gt;java.lang.String&amp;lt;/value-type&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/event-definition&amp;gt;&lt;br /&gt;
&amp;lt;/portlet-app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #f1c232;&quot;&gt;Step 2:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Changes in jsp page to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;portlet:actionURL name=&quot;myAction&quot; var=&quot;actionURL&quot;&amp;gt;&lt;br /&gt;
&amp;lt;/portlet:actionURL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;a href=&quot;&amp;lt;%=actionURL.toString()%&amp;gt;&quot;&amp;gt; Click here &amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this code is generate event from jsp to controller class of Pitcher portlet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
By using below code line we can communicate between Pitcher and Catcher Portlet.&lt;br /&gt;
This is to how we sending event from Pitcher to Catcher portlet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void myAction(ActionRequest actionRequest,ActionResponse actionResponse) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName qname = new QName(&quot;http://liferay.com/events&quot;,&quot;name&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actionResponse.setEvent(qname,&quot;Hello World&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes in Catcher Portlet&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Adding below entry in Catcher portlet. This is defines supported-processing from the Catcher portlet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;portlet-app&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;portlet&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supported-processing-event&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:t=&quot;http://liferay.com/events&quot;&amp;gt;t:name&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/supported-processing-event&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/portlet&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;event-definition&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;qname xmlns:t=&quot;http://liferay.com/events&quot;&amp;gt;t:name&amp;lt;/qname&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value-type&amp;gt;java.lang.String&amp;lt;/value-type&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/event-definition&amp;gt;&lt;br /&gt;
&amp;lt;/portlet-app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;&amp;nbsp;Step 5:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
By below code line&amp;nbsp; capture the event in Catcher Portlet.&lt;br /&gt;
&lt;br /&gt;
@Override&lt;br /&gt;
&lt;br /&gt;
public void processEvent(EventRequest request, EventResponse response)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Event event = request.getEvent();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String name = (String) event.getValue();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response.setRenderParameter(&quot;name&quot;, name);&amp;nbsp;&amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Now, we get this attribute value in jsp page of Catcher portlet.&lt;br /&gt;
In view page of Catcher Portlet, by this line we can get value of parameter from Pitcher Portlet.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% String name = (String)renderRequest.getParameter(&quot;name&quot;); %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;That&#39;s It for IPC. Enjoy the feature to communicate between portlet to portlet!!!&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5507846879885055078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2013/07/ipc-inter-portlet-communication-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5507846879885055078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5507846879885055078'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2013/07/ipc-inter-portlet-communication-in.html' title=' IPC (Inter Portlet Communication) - in Liferay.'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-3606853695027233437</id><published>2012-12-26T06:47:00.000-08:00</published><updated>2012-12-26T06:47:42.729-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="globalScopeGroupid"/><category scheme="http://www.blogger.com/atom/ns#" term="scopeGroupId"/><category scheme="http://www.blogger.com/atom/ns#" term="structure"/><category scheme="http://www.blogger.com/atom/ns#" term="template"/><category scheme="http://www.blogger.com/atom/ns#" term="Theme-Dispaly in vm"/><category scheme="http://www.blogger.com/atom/ns#" term="variable in vm"/><title type='text'>Template : some important variable in template(.vm)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi All,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Many time we use webcontent OOTB functionality for our solution. for that we also use Structure/Template. here Template is render part of WebContent. so many time developer stuck with how to get value of some important properties like theme-dispaly,scopegroupid,image path, etc. so, here give some instruction for that.&lt;br /&gt;
&lt;br /&gt;
1) to get instance of class (some times we can&#39;t get accesss class by serviceLocator.findService())&lt;br /&gt;
$portal.getClass().forName(&quot;com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil&quot;).newInstance()&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
2)currentScopegroupid&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - $getterUtil.getLong($request.get(&quot;theme-display&quot;).get(&quot;scope-group-id&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - $request.theme-display.scope-group-id&lt;br /&gt;3) images path in theme&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $request.get(&quot;theme-display&quot;).path-theme-images&lt;br /&gt;4) themeDispaly&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $request.theme-display&lt;br /&gt;5) globalScopeGroupId&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $groupId &lt;br /&gt;
&lt;br /&gt;
5) find service&lt;br /&gt;
&amp;nbsp;$serviceLocator.findService(&quot;com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService&quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy!!!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/3606853695027233437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/template-some-important-variable-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3606853695027233437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/3606853695027233437'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/template-some-important-variable-in.html' title='Template : some important variable in template(.vm)'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-2784405517825520687</id><published>2012-12-19T05:12:00.001-08:00</published><updated>2012-12-19T05:15:15.082-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay Portal"/><category scheme="http://www.blogger.com/atom/ns#" term="portal"/><category scheme="http://www.blogger.com/atom/ns#" term="service in vm"/><category scheme="http://www.blogger.com/atom/ns#" term="service/util in template"/><category scheme="http://www.blogger.com/atom/ns#" term="structure"/><category scheme="http://www.blogger.com/atom/ns#" term="template"/><category scheme="http://www.blogger.com/atom/ns#" term="util in vm"/><category scheme="http://www.blogger.com/atom/ns#" term="webcontent"/><title type='text'>Servidce/Util classes access in template (.vm) file in Liferay</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Hi &lt;span style=&quot;font-size: x-small;&quot;&gt;Developers,&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Many times you need to access &lt;span style=&quot;font-size: x-small;&quot;&gt;ser&lt;span style=&quot;font-size: x-small;&quot;&gt;vices&lt;span style=&quot;font-size: x-small;&quot;&gt;/util class in template.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;B&lt;/span&gt;elow is some importance hits for the sam&lt;span style=&quot;font-size: x-small;&quot;&gt;e&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&amp;gt;&lt;b&gt;&lt;u&gt; &lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt;Access services using findService method in Velocity(vm)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;css plain&quot;&gt;#set ($userLocalService= $serviceLocator.findService(&lt;/code&gt;&lt;code class=&quot;css string&quot;&gt;&quot;com.liferay.portal.service.UserLocalService&quot;&lt;/code&gt;&lt;code class=&quot;css plain&quot;&gt;))&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;css plain&quot;&gt;=&amp;gt;&lt;/code&gt;&lt;b&gt;&lt;code class=&quot;css plain&quot;&gt;&lt;u&gt;Access util class using&amp;nbsp; findUtil Method for inbuilt Util of Liferay&lt;/u&gt;&lt;/code&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;css plain&quot;&gt;#set ($journalContentUtil = $utiLocator.findUtil(&quot;com.liferay.portlet.journalcontent.util.JournalContentUtil&quot;))&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;css plain&quot;&gt;=&amp;gt; some times you also need to access util class which is not have access in template file like&lt;/code&gt;&lt;code class=&quot;css plain&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; StorageEngineUtil. for that you can use below approch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;..&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;#set ($util = $portal.getClass().forName(&quot;com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil&quot;).newInstance())&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;HTH.. :)) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/2784405517825520687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/servidceutil-classes-access-in-template.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/2784405517825520687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/2784405517825520687'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/servidceutil-classes-access-in-template.html' title='Servidce/Util classes access in template (.vm) file in Liferay'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-8971981537307038058</id><published>2012-12-12T05:23:00.002-08:00</published><updated>2012-12-12T05:25:24.243-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="audio"/><category scheme="http://www.blogger.com/atom/ns#" term="audio-portlet"/><category scheme="http://www.blogger.com/atom/ns#" term="flowplayer"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay Portal"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay portlet"/><category scheme="http://www.blogger.com/atom/ns#" term="mp3 play"/><title type='text'>Audio play in portlet using flowplayer.....</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
For mp3 audio file play you need below plugin swf &amp;amp; js file.&lt;br /&gt;
&lt;br /&gt;
flowplayer.controls-3.2.14.swf&lt;br /&gt;
flowplayer.audio-3.2.10.swf&lt;br /&gt;
flowplayer-3.2.15.swf&lt;br /&gt;
flowplayer-3.2.6.min.js&lt;br /&gt;
&lt;br /&gt;
and here is the sample code snippet to play mp3 audio file which in document library....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt; script type=&quot;text/javascript&quot; src=&quot;/video-portlet/js/flowplayer-3.2.6.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt; a 
href=&quot;http://localhost:8080/documents/10180/f7804b0c-9001-4f59-a7b2-45dcbceae8ca&quot;
 style=&quot;display:block;width:520px;height:330px&quot; id=&quot;unsecure&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/a&amp;gt; &lt;br /&gt;
&amp;lt;&amp;lt; script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $f(&quot;unsecure&quot;, &quot;/video-portlet/flowplayer-3.2.15.swf&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; plugins: {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; controls: {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fullscreen: true,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 30,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; autoHide: false&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; audio: {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: &#39;/video-portlet/flowplayer.audio-3.2.10.swf&#39;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; clip:&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;provider: &quot;audio&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: &quot;http://localhost:8080/documents/10180/f7804b0c-9001-4f59-a7b2-45dcbceae8ca&quot; is a document library file url.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/8971981537307038058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/audio-play-in-portlet-using-flowplayer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8971981537307038058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8971981537307038058'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/12/audio-play-in-portlet-using-flowplayer.html' title='Audio play in portlet using flowplayer.....'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5121374570562517702</id><published>2012-09-24T07:38:00.000-07:00</published><updated>2012-12-12T05:31:54.540-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="connect to another database other then default liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="connect to another datasource"/><category scheme="http://www.blogger.com/atom/ns#" term="different datasource for portlet service"/><category scheme="http://www.blogger.com/atom/ns#" term="portlet connection with other databse"/><title type='text'>Connect to Another Datasource/Database Schema from Portlet with service</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi Folks,&lt;br /&gt;
&lt;br /&gt;
Many developer/client&#39;s need to separate the liferay database table and custom database table. so, here is the solution to maintain this approach. for that we maintain two data source/schema for liferay and custom database. we can achieve this by trying to&amp;nbsp; following steps -&lt;br /&gt;
&lt;br /&gt;
1) portal-ext.properties&lt;br /&gt;
&lt;br /&gt;
Add two connection properties for maintain two differance database source/schema. for example&lt;br /&gt;
&lt;br /&gt;
###### MySQL Connection#######&lt;br /&gt;
## Liferay default database connection&lt;br /&gt;
jdbc.default.driverClassName=com.mysql.jdbc.Driver&lt;br /&gt;
jdbc.default.url=jdbc:mysql://localhost/test?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false&lt;br /&gt;
jdbc.default.username=root&lt;br /&gt;
jdbc.default.password=root&lt;br /&gt;
&lt;br /&gt;
## Your new database connection&lt;br /&gt;
jdbc.test.driverClassName=com.mysql.jdbc.Driver&lt;br /&gt;
jdbc.test.url=jdbc:mysql://localhost/mytest?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false&lt;br /&gt;
jdbc.test.username=root&lt;br /&gt;
jdbc.test.password=root&lt;br /&gt;
&lt;br /&gt;
2) ext-spring.xml&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; create ext-spring.xml in docroot\WEB-INF\src\META-INF\ of you portlet to connect with other database shema default then liferay. copy the below content and paste in newly created file.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;lt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;&amp;lt;beans&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; default-destroy-method=&quot;destroy&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; default-init-method=&quot;afterPropertiesSet&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&quot;http://www.springframework.org/schema/beans&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xsi:schemaLocation=&quot;http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd&lt;br /&gt;
&lt;br /&gt;
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd&quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;bean id=&quot;testDataSource&quot; class=&quot;org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;targetDataSource&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;bean class=&quot;com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;propertyPrefix&quot; value=&quot;jdbc.test.&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/bean&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/property&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/bean&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;bean id=&quot;testHibernateSessionFactory&quot; class=&quot;com.liferay.portal.spring.hibernate.PortletHibernateConfiguration&quot; lazy-init=&quot;true&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;dataSource&quot; ref=&quot;testDataSource&quot; /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/bean&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;bean id=&quot;testSessionFactory&quot; class=&quot;com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl&quot; lazy-init=&quot;true&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;sessionFactoryImplementor&quot; ref=&quot;testHibernateSessionFactory&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/bean&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;bean id=&quot;testTransactionManager&quot; class=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot; lazy-init=&quot;true&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;dataSource&quot; ref=&quot;testDataSource&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;globalRollbackOnParticipationFailure&quot; value=&quot;false&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;property name=&quot;sessionFactory&quot; ref=&quot;testHibernateSessionFactory&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;/bean&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;/beans&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) service.xml&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; create entity with the parameter data-source,session-factory,tx-manager to connect other then default database. for example....&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;entity name=&quot;MyTable&quot; local-service=&quot;true&quot; remote-service=&quot;false&quot; data-source=&quot;testDataSource&quot; session-factory=&quot;testSessionFactory&quot; tx-manager=&quot;testTransactionManager&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) service.properties&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; check the entry of ext-spring.xml in \docroot\WEB-INF\src\service.properties file(some version of liferay have already this entry). if it is not there then append spring.configs properties with the value &quot;WEB-INF/classes/META-INF/ext-spring.xml&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;At Last......&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;After deploying portlet, custom portlet are able to connect with other then default database source/schema .&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;NOTE :&lt;br /&gt;
&amp;nbsp;1)This example is&amp;nbsp; based on Liferay 6.0 and 6.0.29 tomcat bundle. you have to do specific changes in any of file(.xml) if needed based on Liferay version.&lt;br /&gt;
&amp;nbsp;2)While you connect with other then default liferay database source/schema. service-builder can&#39;t create automatically table in database. you have to create table manually. then after you can CURD operation for you custom table same as liferay default database.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5121374570562517702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/09/connect-to-another-datasourcedatabase.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5121374570562517702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5121374570562517702'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/09/connect-to-another-datasourcedatabase.html' title='Connect to Another Datasource/Database Schema from Portlet with service'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-8715800308132968366</id><published>2012-09-06T05:28:00.002-07:00</published><updated>2012-09-06T05:29:12.640-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database connection with Liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="DB2"/><category scheme="http://www.blogger.com/atom/ns#" term="Derby"/><category scheme="http://www.blogger.com/atom/ns#" term="Hypersonic"/><category scheme="http://www.blogger.com/atom/ns#" term="Ingres"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay Portal"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="P6Spy"/><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Sybase"/><title type='text'>Liferay portal connection with various databse</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi visitor,&lt;br /&gt;
&lt;br /&gt;
here is the list of&amp;nbsp; different/various database and it&#39;s connection properties to connection Liferay portal.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;MySQL&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=com.mysql.jdbc.Driver&lt;br /&gt;
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false&lt;br /&gt;
jdbc.default.username=&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Oracle&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver&lt;br /&gt;
jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe&lt;br /&gt;
jdbc.default.username=lportal&lt;br /&gt;
jdbc.default.password=lportal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DB2&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver&lt;br /&gt;
jdbc.default.url=jdbc:db2://localhost:50000/lportal:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;&lt;br /&gt;
jdbc.default.username=db2admin&lt;br /&gt;
jdbc.default.password=lportal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Derby&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=org.apache.derby.jdbc.EmbeddedDriver&lt;br /&gt;
jdbc.default.url=jdbc:derby:lportal&lt;br /&gt;
jdbc.default.username=&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Hypersonic&lt;br /&gt;
&lt;br /&gt;
dbc.default.driverClassName=org.hsqldb.jdbcDriver&lt;br /&gt;
dbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal&lt;br /&gt;
dbc.default.username=sa&lt;br /&gt;
dbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Ingres&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=com.ingres.jdbc.IngresDriver&lt;br /&gt;
jdbc.default.url=jdbc:ingres://localhost:II7/lportal&lt;br /&gt;
jdbc.default.username=&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;P6Spy&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=com.p6spy.engine.spy.P6SpyDriver&lt;br /&gt;
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false&lt;br /&gt;
jdbc.default.username=&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;PostgreSQL&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=org.postgresql.Driver&lt;br /&gt;
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal&lt;br /&gt;
jdbc.default.username=sa&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;SQL Server&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver&lt;br /&gt;
jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal&lt;br /&gt;
jdbc.default.username=sa&lt;br /&gt;
jdbc.default.password=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Sybase&lt;br /&gt;
&lt;br /&gt;
jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver&lt;br /&gt;
jdbc.default.url=jdbc:jtds:sybase://localhost:5000/lportal&lt;br /&gt;
jdbc.default.username=sa&lt;br /&gt;
jdbc.default.password=&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/8715800308132968366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/09/liferay-portal-connection-with-various.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8715800308132968366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/8715800308132968366'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/09/liferay-portal-connection-with-various.html' title='Liferay portal connection with various databse'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-1463345255038974831</id><published>2012-08-05T23:52:00.000-07:00</published><updated>2012-08-05T23:52:47.108-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DB drop table"/><category scheme="http://www.blogger.com/atom/ns#" term="Drop all sqeuence"/><category scheme="http://www.blogger.com/atom/ns#" term="Drop all tables"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle drop table"/><category scheme="http://www.blogger.com/atom/ns#" term="table drop"/><title type='text'>Drop all tables from users schemas in Oracle</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Many times we need to clear/delete all TABLE from users schema.We can&#39;t directly delete all table.it is tedious task to delete table one by one by command. here is short way to do this.&lt;br /&gt;&lt;br /&gt;Execute following statement which will create drop query for every table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT &#39;DROP TABLE &#39; || TABLE_NAME || &#39; CASCADE CONSTRAINTS;&#39; FROM user_tables;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, analyze results and &lt;u&gt;copy appropriate statements, paste and execute &lt;/u&gt;them against the database.&lt;br /&gt;&lt;br /&gt;This is the simple way to delete all tables from user&#39;s schema.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This approach can also be used in order to drop all SEQUENCE from user&#39;s schema.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT &#39;DROP SEQUENCE &#39; || sequence_name || &#39;;&#39; FROM user_sequences;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That&#39;s it. enjoy...!!!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/1463345255038974831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/08/drop-all-tables-from-users-schemas-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/1463345255038974831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/1463345255038974831'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/08/drop-all-tables-from-users-schemas-in.html' title='Drop all tables from users schemas in Oracle'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-5296763491272384210</id><published>2012-07-24T06:17:00.000-07:00</published><updated>2012-07-25T01:39:18.566-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MethodKey"/><category scheme="http://www.blogger.com/atom/ns#" term="poratl-impl"/><category scheme="http://www.blogger.com/atom/ns#" term="PortalClassInvoker"/><title type='text'>Use of PortalClassInvoker in Liferay-Portlet...</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

Some times we need to use portal-impl classes functionality,but we
can&#39;t access that in our custom portlet. Hence,we require to
PortalClassInvoker class. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;for example :&lt;/b&gt; we need to
access PortalLDAPUtil.getLdapServerId()&lt;i&gt;(method for get LDAP
ServerId)&lt;/i&gt; in our costum portlet and it&#39;s there in portal-impl ,so
access is the issue. For that , we use PortalClassInvoker.invoke()
&lt;i&gt;(This method have many forms)&lt;/i&gt; with MethodKey.&lt;br /&gt;&lt;br /&gt;Following
are  steps to use  PortalClassInvoker.invoke() method to access
utility of portal-impl class PortalLDAPUtil.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1) Initialize
MethodKey object.&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;u&gt;Syntax : &lt;/u&gt;MethodKey portalLDAPUtilMethodKey = new
MethodKey(&quot;classNameWithPackagePath&quot;,
&quot;methodName&quot;,argClassType1,argClassType2......);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;Example :&lt;/u&gt; MethodKey
portalLDAPUtilMethodKey = new
MethodKey(&quot;com.liferay.portal.security.ldap.PortalLDAPUtil&quot;,
&quot;getLdapServerId&quot;,Long.class,String.class);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;br /&gt;&lt;b&gt;2) Use PortalClassInvoker.invoke() to access portal-impl
classes using MethodKey.&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;Syntax :
&lt;/u&gt;PortalClassInvoker.invoke(newInstance, methodKey,
argumentList);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;Example
:&lt;/u&gt; Long ldapServerId = (Long) PortalClassInvoker.invoke(false,
portalLDAPUtilMethodKey, new Object[]
{Long.valueOf(themeDisplay.getCompanyId()),screenName});&lt;br /&gt;

here &lt;i&gt;&lt;u&gt;screenName &lt;/u&gt;&lt;/i&gt;is ldap user screenName. i.e. “ketan.savaliya”.&lt;br /&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/5296763491272384210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/use-of-portalclassinvoker-in-liferay.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5296763491272384210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/5296763491272384210'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/use-of-portalclassinvoker-in-liferay.html' title='Use of PortalClassInvoker in Liferay-Portlet...'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-7496844427173768622</id><published>2012-07-19T03:13:00.001-07:00</published><updated>2012-07-24T06:20:33.412-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ext"/><category scheme="http://www.blogger.com/atom/ns#" term="ext deploy"/><title type='text'>Deployment/ReDeployment  ext in liferay</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;I assume that you have WAR file
ready for deployment and name of ext is abc-ext.war.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;First of all,
shutdown your tomcat if it&#39;s already running and delete your work and temp
folder.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;Now go &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;to \tomcat\lib\ext folder&lt;/span&gt;
, and remove ext-abc-ext-service.jar.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;Go inside &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;webapps&lt;/span&gt;, and remove the
abc-ext.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;Go inside webapps&lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;\ROOT\WEB-INF&lt;/span&gt; and remove&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 110.25pt; mso-list: l1 level1 lfo2; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;liferay-display-ext.xml&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 110.25pt; mso-list: l1 level1 lfo2; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;ext-abc-ext.xml&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 110.25pt; mso-list: l1 level1 lfo2; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;liferay-portlet-ext.xml&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 110.25pt; mso-list: l1 level1 lfo2; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;portlet-ext.xml,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 9.0pt;&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;&amp;nbsp;&amp;nbsp;
5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Go inside &lt;span style=&quot;background: none repeat scroll 0% 0% yellow;&quot;&gt;webapps\ROOT\WEB-INF\lib&lt;/span&gt; and delete &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.5in; mso-list: l2 level1 lfo3; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;ext-abc-ext-impl.jar,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.5in; mso-list: l2 level1 lfo3; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;ext-abc-ext-util-bridges.jar,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.5in; mso-list: l2 level1 lfo3; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;ext-abc-ext-util-java.jar
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.5in; mso-list: l2 level1 lfo3; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;ext-abc-ext-util-taglib.jar.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start the
tomcat.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Put WAR file
inside hot deploy folder and wait till it expends and give message to reboot
your server.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Restart
tomcat and its done.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/7496844427173768622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/deploymentredeployment-ext-in-liferay.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7496844427173768622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/7496844427173768622'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/deploymentredeployment-ext-in-liferay.html' title='Deployment/ReDeployment  ext in liferay'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8497974520306283394.post-6616273198304155378</id><published>2012-07-19T03:06:00.001-07:00</published><updated>2016-07-28T03:53:11.740-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclips"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay +svn"/><category scheme="http://www.blogger.com/atom/ns#" term="liferay svn"/><category scheme="http://www.blogger.com/atom/ns#" term="svn"/><category scheme="http://www.blogger.com/atom/ns#" term="svn + eclips"/><category scheme="http://www.blogger.com/atom/ns#" term="svn plugin in eclips"/><title type='text'>SVN with eclipse configuration in Windows</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;aui-w52 portlet-column&quot; id=&quot;column-2&quot;&gt;
&lt;div class=&quot;portlet-dropzone portlet-column-content portlet-column-content-first&quot; id=&quot;layout-column_column-2&quot;&gt;
&lt;div class=&quot;portlet-boundary portlet-boundary_1_WAR_knowledgebaseportlet_  portlet-static portlet-static-end knowledge-base-portlet-admin &quot; id=&quot;p_p_id_1_WAR_knowledgebaseportlet_&quot;&gt;
&lt;div class=&quot;portlet-borderless-container&quot; id=&quot;aui_3_2_0_1989&quot;&gt;
&lt;div class=&quot;portlet-body&quot; id=&quot;aui_3_2_0_1988&quot;&gt;
&lt;div class=&quot;kb-tools&quot;&gt;
&lt;div class=&quot;kb-article-tools&quot;&gt;
&lt;table class=&quot;lfr-table&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;a class=&quot;taglib-icon&quot; href=&quot;http://www.blogger.com/blogger.g?blogID=8497974520306283394&quot; id=&quot;_1_WAR_knowledgebaseportlet_suxb&quot;&gt;&lt;span class=&quot;taglib-text&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;kb-entity-body&quot;&gt;
To configure svn in eclipse for windows, we need to process below steps...&lt;br /&gt;
&lt;br /&gt;
1) Install svn plugins in eclipse&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Go to : Help Menu-&amp;gt;eclipse marketplace...-&amp;gt;Popular(tab)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;install below two plugins one after other&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I) Subeclipse&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; II)Subversive - SVN Team Provider&lt;br /&gt;
&lt;br /&gt;
2) After that restart eclipse&lt;br /&gt;
&lt;br /&gt;
3) Now go to SVN Repositories window for useing svn repository.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it. enjoy :))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ktnsavalia.blogspot.com/feeds/6616273198304155378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/svn-with-eclipse-configuration-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/6616273198304155378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8497974520306283394/posts/default/6616273198304155378'/><link rel='alternate' type='text/html' href='http://ktnsavalia.blogspot.com/2012/07/svn-with-eclipse-configuration-in.html' title='SVN with eclipse configuration in Windows'/><author><name>ketan savaliya</name><uri>http://www.blogger.com/profile/03902427001612845638</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPZbvPgkqv7IgkMj7-YSuamZQqiFT9H92Rwf2VcpILhCAymDvRvZqHatDNbiYssjZRMBZo6V6nNVRgEHGsPT9o8v99bprkt29dDjb9FSYJ4pC9I5PftCpAnKcXqwQzVk/s1600/*'/></author><thr:total>0</thr:total></entry></feed>