Foros de discusión

Struts Portlet for Plugin Environment.

thumbnail
meera prince, modificado hace 12 años.

Struts Portlet for Plugin Environment.

Liferay Legend Mensajes: 1111 Fecha de incorporación: 8/02/11 Mensajes recientes
Hi i am using Liferay6.0.6 version. I want develop struts portle in plugin environment.
I am having confusion which struts portlet, I have to choose. Community people providing
1) Sample liferay struts portlet
2) Sample struts portle

Sample liferay struts portle: when I deploy this porlte I got many issues. i unable to run service builder for this. i gone through many forums , i did not get proper answer. Moreover here they are using some tomcat support class loaders by which they are referencing portal classes. somebody suggested use portal level classes in plugin portlet is not recommended way.
When i deploy this portlet first i got StrutsPortlet.java class not found exception and PortletAction not found.
Later some body suggested use some code in META_INF/context.xml like this
<Context>
<Loader
loaderClass="com.liferay.support.tomcat.loader.PortalClassLoader"
/>
</Context>

And configure the following in tomcat server.xml
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false"
hostConfigClass="com.liferay.support.tomcat.startup.PortalHostConfig">
or

<Host appBase="webapps" autoDeploy="true" deployXML="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
they said deployXML="true"

i did all these work around i am able to deploy the struts portlet. Later i run the service builder for this portlet but i could not run the service builder for this.
When i deploy it shows many compile time errors. Like Model classes and util classes are not resolved type.
Finally i observed one thing .classes file not available in the classes directory of portlet. i did work around like i copy the service jar into classes folder and i extracted the jar. This time portlet was deployed but in tomcat log file i am getting errors model classes and util classes not found exceptions.

My intention is i have to develop struts portlet in plugin environment similar to how liferay people done in portal ,mean i need use PortletAction and StrutsAction classes in Plugin environment. But these clasess are available in Portal-Impl.jar. So we are unable use these classes in plug-in environment.
My Doubts:
1) Why liferay did not expose struts related classes to plugin environment. like portal-service.jar.
2) what is the way to develop struts portlet in plugin Environment similar to liferay portal struts portlet.

sample struts portle:
I identified this is another struts portlet available in liferay svn. i deployed this portlet into my plgin environment i deployed succesfully and i can able to run service builder also. but i have some concerns with respect this.
This portlet is using Portal-Brdges classes. Here my major concern is i am unable to use process action method for the portlet. And moreover our Controllers extend Apache Action in that , we can use execute method with pure httprequest and httprespnse
1) Hoe to use ActionRequest and ActionRespnse for this porltlet. mean how to call ProcessAction method. And render method.
2) Here they are using <html:action="/struts/login"> to call the controller how to create Portlet ActionURL and Portlet Render URL in this place.
3)How to call ServeResourse metho for this portle.
4)How to implement tabs concept for this.
5) how to create cutome configuration for this

Hi guys please gone through the my post . provide the optimal solution. People are giving dofferent work around for this struts portle in plugin environment. I did nor found the the systematic procedure to create struts portlet in plugin environment.
I am eagerly waiting for your answers.
Thanks&Regards
Meera