留言板
configuring spring in web.xml
Hi,
I was trying to invoke a web service from my portlet in the process action method. When I tried to invoke the service it was giving me an error like
java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
But When I was trying to invoke the same service as a simple java project it works fine. Please let me know what modifications have to be made in web.xml and portlet.xml files to make it work in the portlet.
I was trying to invoke a web service from my portlet in the process action method. When I tried to invoke the service it was giving me an error like
java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
But When I was trying to invoke the same service as a simple java project it works fine. Please let me know what modifications have to be made in web.xml and portlet.xml files to make it work in the portlet.
Mika Koivisto,修改在12 年前。
RE: configuring spring in web.xml
Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
Do you have spring-context.jar in WEB-INF/lib of your portlet?
Hey Mika,
Thanks for the help. I moved the spring jars into the web-inf/lib folder and it started work. But i really do understand this. I have already added them to them to the classpath and they are in present in the Referenced Library folder. Why doesn't it pick the jars from there.Whats the point in moving them into the lib folder.
It would be great if you could explain this. Thank You.
Thanks for the help. I moved the spring jars into the web-inf/lib folder and it started work. But i really do understand this. I have already added them to them to the classpath and they are in present in the Referenced Library folder. Why doesn't it pick the jars from there.Whats the point in moving them into the lib folder.
It would be great if you could explain this. Thank You.
Mika Koivisto,修改在12 年前。
RE: configuring spring in web.xml
Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
Eclipse or what ever IDE you are using might know about those jars but the app server executing the portlet does not unless they are in it's classpath. By default every webapp loads jars in WEB-INF/lib into that webapps classpath.
thanks for that I understand it now.
Now I have new problem, My view.jsp file in a portlet was working fine till this morning. But i don't know I was modifying my view.jsp n number of times and deploying it but the view doesn't get altered a bit. Its like stuck at that point. I don't understand whats causing the problem.
Now I have new problem, My view.jsp file in a portlet was working fine till this morning. But i don't know I was modifying my view.jsp n number of times and deploying it but the view doesn't get altered a bit. Its like stuck at that point. I don't understand whats causing the problem.