留言板

to load applicationContext.xml

pooja mahajan,修改在11 年前。

to load applicationContext.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
Hi,

Can anyone please tell me how to configure my applicationContext.xml in liferay 6.1 using jboss7
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: to load applicationContext.xml

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在11 年前。

RE: to load applicationContext.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
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,修改在11 年前。

RE: to load applicationContext.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
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,修改在10 年前。

RESOLVED : Load applicationContext.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
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,修改在10 年前。

RE: RESOLVED : Load applicationContext.xml

New Member 帖子: 8 加入日期: 10-12-22 最近的帖子
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,修改在10 年前。

RE: RESOLVED : Load applicationContext.xml

Junior Member 帖子: 82 加入日期: 13-1-10 最近的帖子
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.