Deploying modified Portlet JSPs in Liferay without restarting

Share

This is an issue that I have tried to find answers on the internet because it is a big problem that I had.
So the problem is in Liferay Portlet development. When you work on the JSP files, make minor modifications and want to upload them into Liferay to see them. To be recompiled

If you overwrite the JSP files into webapps/youre-portlet folder the modifications are simply NOT recompiled.
They are not.
The “classical” solution is to re-deploy the portlet but this is very frustrating because it takes too long and really slows the development process.

I’ve seen the solution o some forums but nobody quit nailed the problem. Everywhere it was written vaguely. So here is what you have to do:

In the Liferay’s temp folder there are sub folders for each portlet. The modified JSP must be placed in there and in this case Liferay will refresh (recompile the JSP) and show the modification. BUT beware that there are multiple sub folders for each portlet. You have to place the JSP file in the last one in chronological order. The newest one.

I recommend creating some ANT scripts to do this automatically because it is also frustrating to keep copy/paste-ing them. In this case you have to be careful that the scripts copy only the modified JSP. If you copy the whole JSP folder (like WEB-INF/web-ui or whatever is yours) that it will not work. Liferay does not accept this. Or at least it didn’t work to me.

I hope this will save you some time.

Cheers.

Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.

5 thoughts on “Deploying modified Portlet JSPs in Liferay without restarting”
  • Mallik says:

    thanks .. it worked for me when i copied the jsp to the temp folder but i am still wondering why the portlet level caching can not be disabled using a property. Please let me know if any one knows to disable the cache for the portlet jsp.

    June 8, 2010 at 12:42 pm
  • tyu says:

    search folder cache

    October 18, 2010 at 7:50 pm
  • It helped thanks. I think the problem is with the copied .jsp’s “modification date”.. For a reason I still don’t know, the new version if the file has a wrong modification date that is before the modification date of the cached version…

    December 29, 2010 at 7:52 pm
  • Mark says:

    Can your share your ant script?

    March 12, 2012 at 5:03 pm
  • Mike says:

    In your ant script, just add this parameter to the COPY task :
    preservelastmodified=”true”

    By default, it’s FALSE and will keep the old date! That’s why it wasn’t updating it.

    March 16, 2012 at 4:04 pm

Comments are closed.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close