Jul 09
9
I’ve just completed a sample portlet using the new Struts 2 framework. Struts 2 is a really elegant, comprehensive framework that is much easier to use than Struts 1.x. What’s more is that Struts 2 works hand-in-hand with Spring so there’s a lot support built-in for it.
This sample portlet demonstrates using the new Struts form mechanism and shows how dependency injection comes naturally for Struts 2 actions. Take a look at the screencast to see what this new portlet does.
Hello Jeff. First of all thanks for your great work.
I wanted to contact you because I’m having an issue with your struts sample portlets for Liferay.
I can deploy them smoothly, but when I shutdown and restart my server, I get the following error:
GRAVE: Portal class loader is not available to override the default Catalina web class loader
And a failure to start context [/hellostruts2-portlet] because of previous errors.
Any idea?
Thanks is advance.
Richard:
Thanks for your inquiry. First, can you tell me what server are you using (JBoss, Tomcat, etc.)?
At first glance, the error seems to indicate a problem in your class loader file. The default one for Tomcat/Liferay is found in the META-INF folder in the war file in the context.xml file. In the zip file from my site, its currently set as:
<context>
<loader loaderClass="com.liferay.support.tomcat.loader.PortalClassLoader"
/>
</context>
Depending on your Liferay portal configuration, you should change this to use a class loader supported by your server.
Hi
I have deployed your struts-portlet example code on Liferay-Tomcat smoothly. But the problem occurs when I deployed your example on Liferay-Glassfish.
I haved tried many times, would you please check your code for Liferay(5.2.3)-Glassfish and suggest me.
Thank you for your support.
Hi Jeff,
I have errors when i deployed the Hello struts portlet on Liferay JBoss5.2.3.
what is the loaderClass for jboss?
thanks in advance
Mohamed:
I am unaware that JBOss even requires a class loader. Try removing the context.xml file altogether to see if that resolves your problem. If not, the you may need to consult the JBoss forums for further
information.
Jeff,
Thank you for response.
It doesn’t resolve the problem.
I follow this wiki (http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How%20to%20access%20the%20full%20Liferay%20API%20from%20a%20portlet%20application
) and I have same result.
I think the problem is the liferay doesn’t load the liferay libs