Foren

to load applicationContext.xml

pooja mahajan, geändert vor 11 Jahren.

to load applicationContext.xml

Junior Member Beiträge: 45 Beitrittsdatum: 30.01.13 Neueste Beiträge
Hi,

Can anyone please tell me how to configure my applicationContext.xml in liferay 6.1 using jboss7
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: to load applicationContext.xml

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I'm not sure but have you looked at the following blog?

http://www.liferay.com/web/michael.han/blog/-/blogs/liferay-spring-contexts
pooja mahajan, geändert vor 11 Jahren.

RE: to load applicationContext.xml

Junior Member Beiträge: 45 Beitrittsdatum: 30.01.13 Neueste Beiträge
Thanks for help. I have already referred the link .
Basically my applicationContext.xml contains jndi-lookup , beans like

<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>resources.messages</value>
</list>
</property>
</bean>

i am unable to read "messageSource" from applicationContext.xml.
I went ahead and configured the same bean in my allportlets*-portlet.xml configuration files to sucessfully load my portlets.
Can anyone suggest us a better way
pooja mahajan, geändert vor 11 Jahren.

RE: to load applicationContext.xml

Junior Member Beiträge: 45 Beitrittsdatum: 30.01.13 Neueste Beiträge
Is it necessary to configure messageSource bean individually in all my portlet's * .xml for liferay 6.1 version.
As in liferay 5.2 - 6.0 it was configured in my application.xml and my application was sucessfully deployed and was working fine.

Please suggest ...
pooja mahajan, geändert vor 10 Jahren.

RESOLVED : Load applicationContext.xml

Junior Member Beiträge: 45 Beitrittsdatum: 30.01.13 Neueste Beiträge
Finally i loaded by applicationContext.xml by making following changes in my portlet.xml

<portlet>
<portlet-name>abc</portlet-name>
<portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
<init-param>
<name>contextConfigLocation</name>
<value>/WEB-INF/applicationContext.xml,/WEB-INF/abc-portlet.xml</value>
</init-param>
.....
</portlet>

Hope it helps !!!!!!!1
thumbnail
Siva Reddy, geändert vor 10 Jahren.

RE: RESOLVED : Load applicationContext.xml

New Member Beiträge: 8 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hello Pooja,
I am also trying to load appliacationcontext through web.xml but it doesn't find application context beans in the abc-portlet.xml
I am certainly doesn't want to load all the beans in the every abc-portlet.xml. Is there a better way? Appreciated your inputs.
Darryl Kpizingui, geändert vor 10 Jahren.

RE: RESOLVED : Load applicationContext.xml

Junior Member Beiträge: 82 Beitrittsdatum: 10.01.13 Neueste Beiträge
For Tomcat users, but may also apply to other application server.
If you are using Liferay 6.1 GA2 (I don't know about the GA3) there is bug that prevents loading spring beans declared in the web.xml. Once your portlet is deployed, you have to change, in the webapps directory, the order of the spring listeners to load the application-context.xml before the portlet resources.

The bug is reported in JIRA.