原创 JRebel
Recently, I tried an awesome an Tool - JRebel. It saves a lot of time of compile and deploy our project. In my case, I
原创 Get value from properties file outside a jar using Spring
I have a jar file which need to dynamically load external properties file
原创 Spring global exception handling with standalone app
I have a standalone app, I need to catch all exceptions. There's one case that when I disconnect the internet, I couldn
原创 Ant Task check if a file exists
This is to remember what I learned when I customize Liferay SDK plugins. I
原创 java.lang.String cannot be resolved, Indirectly referenced from required .class file
Here is the solution. It's similar to the link I found. http://dev-answers.blogspot.com/2009/06/eclipse-build-errors-ja
原创 Java Send email
Sometimes we want to send an email out when catch an exception. We need to use javax.mail jar to help us to do that. Ac
原创 Maven generates jar file with main class setting and dependency libs copy
When I write a pure java project, I'm afraid of writing deployment doc. Because I need to generate jar file. The most f
原创 log4j create a new log file every day
After I joined in new project, I realized log is very important. We can log in console or file. Here is to introduce a
原创 Liferay And Twitter
Requirements: In our Liferay instance, we need to display organizations' tweets in twitter portlet. Those organizations
原创 Liferay PortletURL(Render, Action, Resource)
1.To get currentURL :PortletURL url = PortletURLUtil.getCurrent(renderRequest, renderResponse); 2. Cre
原创 Liferay LocalServiceUtil and ServiceUtil
In Liferay, there's a lot of Service Util classes. They're really convenient. One thing I notice is that there's LocalS
原创 Liferay Inter-portlet communication(client side)
It's very easy to do that. Liferay provides script to do that. This is the syntax: Liferay.fire(eventName, data) Lif
原创 Embedding a portlet in web content
Today I had a test embeded portlet in web content. This article exactly shows the steps how to embed portlet in a web c
原创 Java compareTo, equals and hashcode
Last time, when our team reviewed my code, they pointed several problems of my code. I'm really happy to learn from the
原创 Jersey make REST call
When we make a rest call and the response is XML or JSON, it would be better to use plugins other than from scratch. I