Laliwala IT Services

Laliwala IT Services
Website Development

Saturday, February 19, 2011

Liferay Portal broke images, theme development tutorail, deployed ext, deployed custome theme, Liferay Weblogic Server, jboss use liferay, Liferay version: 5.2.3









julia









:

 Liferay theme development tutorial
 Liferay Weblogic Server
Liferay Default Theme
Liferay image broken
Liferay root context
Liferay Deployed EXT
 Liferay Source Code

Changing root context broke images in Liferay


I developed a new theme in liferay portal and it is working fine with non root context. When I changed the context all the images are broken. Here are the steps. Pl. let me know if I am missing something.


Liferay version: 5.2.3





Environment: Weblogic 10


1) Added portal.ctx=/liferay in portal-ext.properties


2) Updated context-root as /liferay n weblogic.xml


3) dropped lportal schema and recreated.


4) Removed all temp directories from Weblogic server.


3) Deployed ext environment.





Everything look fine. Default theme Classic displays all the images as it is supposed to.





When I deployed custome theme, all the images are broken. Looked at source code. image URL is missing /liferay infront of it. Not sure how to solve the issue.





-julia



julia  : Do not use <context-root> element in weblogic.xml of any war which you are planning to deploy in LR auto deploy dir. This solves the issue in liferay theme development.



Allison : RE: Changing root context broke images in liferay portal theme





Yeah right - it doesn't work.


I have done almost same but on JBoss 4.3 but I have cyclic redirect.


I don't want let LF to use root context "/" - it's used by JBoss.


So the question is same: how can I set context for LF other then root and with correct resources handle?



Gaston : Hi Liferay developer,





Can you try by changing the following property in portal-ext.properties?


#


# Specify the path of the portal servlet context. This is needed because


# javax.servlet.ServletContext does not have access to the context path


# until Java EE 5.


#


# Set this property if you deploy the portal to another path besides root.


#


portal.ctx=/


Hope it will work.



Allison : ok I have done next - set both portal.ctx=/liferay-context and <context-root>/liferay-context</context-root> in JBoss descriptor - it works.





It's little strange in liferay portal because I have tried such variant before and haven't resources work











No comments:

Post a Comment