留言板

Liferay-Struts-ServiceBuilder

thumbnail
Banji O,修改在14 年前。

Liferay-Struts-ServiceBuilder

Junior Member 帖子: 59 加入日期: 07-4-3 最近的帖子
Has anyone been able to get Liferay-Struts and Servicebuilder working on the same portlet war in the SDK?
HELP!!!
thumbnail
Albert J Carter-Corbin,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Regular Member 帖子: 123 加入日期: 06-9-12 最近的帖子
I have gotten struts to work with service builder in the SDK.

But when I was done I took the components of the plugin sdk and put them in a war template that I use for liferay development. That way I could just copy the template to create a new plugin and utilize the features of my IDE (which happens to be eclipse).
thumbnail
Banji O,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 59 加入日期: 07-4-3 最近的帖子
Can you please share your template? I have tired every way I know to do this. Thanks
thumbnail
Albert J Carter-Corbin,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Regular Member 帖子: 123 加入日期: 06-9-12 最近的帖子
Here is the link to download the template:

http://www.cartercorbin.com/c/document_library/get_file?p_l_id=12502&folderId=13112&name=DLFE-601.zip

Basically it is an eclipse dynamic web application. I've copied the build xml files from the 5.2.3 plugin environment and made the required changes to accomodate the file structure from the template. I've also copied the required jar files to the web application as well as the service.xml file.

The only other requirement is to add a user library called LiferayLibs and add the liferay jar files to the libray.

To accomodate the api classes vs. the implementation classes I created two source directories entitled api and impl. The service.xml file and the service.properties file is in the imp source directory. The ant scripts are all there. For building the services, wsdd and war files the ant scripts should all be there.

When you run the war script the generated war file will be in the build directory.

let me know if you have any questions or issues. But this was only way I could use all of the liferay plugin tools and the ide tools that are available in eclipse.

BTW: Netbeans has some cool tools in the portlet plugin pack. Especially with their service builder interfaces. But I am not a Net Beans fan.
thumbnail
Albert J Carter-Corbin,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Regular Member 帖子: 123 加入日期: 06-9-12 最近的帖子
I've used the same template to create jsp, struts, jsf and icefaces portlets. All you really need is the required jar files in the WEB-INF\lib directory and the lib directory. Then add the required entries in the portlet.xml and web.xml files.

If you like I could make the required modifications and upload the eclipse projects as well.
thumbnail
Banji O,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 59 加入日期: 07-4-3 最近的帖子
Thanks for your response. I was not able to get the template to deploy correctly. If you could please make the modifiacations you were referring to earlier.
thumbnail
Albert J Carter-Corbin,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Regular Member 帖子: 123 加入日期: 06-9-12 最近的帖子
The template was an Eclipse project that you import as an existing project. Then you can use eclipse to develop your portlets.

How were you trying to deploy the template?

The ant script should have still worked if you used a different method of developing your portlets.
thumbnail
Banji O,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 59 加入日期: 07-4-3 最近的帖子
I did that, but i think the template is missing some libs or maybe I am missing something else. i was hoping you could add the other stuff you described to the template
thumbnail
Albert J Carter-Corbin,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Regular Member 帖子: 123 加入日期: 06-9-12 最近的帖子
The other items that I mentioned were for Liferay to recognize the liferay api utilizing eclipse. For code completion, etc. I deployed the war file that was generated by the ant scripts that are in the build files from the template.

I created the template from an existing project that I had in eclipse. I modified the build.xml files as well as the liferay-portlet.xml, portlet.xml and the web.xml.

Then I used ant to build the war file. I deployed the war file in the build sub directory to liferay and it worked fine. From there I zipped up the eclipse project and posted it on my website for you to use.

What issues are you having?

Are you using eclipse or just the ant scripts?
thumbnail
Nicolas Grolleau,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 90 加入日期: 09-11-12 最近的帖子
Hi, Albert,

I'm becoming mad trying to use liferay-struts and service builder in the server classpath (i'm referencing tables from liferay).
I would be curious to have a look at one of your portlets using both struts and service builder.
Would it be possible if you upload a sample?
Also, I tried to download the template you are discussing here, but it seems it is no more on your site, could you please re-upload it?
Michael Illgner,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 33 加入日期: 09-6-30 最近的帖子
Hi folks
I just got the same problem using liferay SDK with struts and servicebuilder. I think something with the classpath is wrong and the persitence bean of the service does not get loaded
thumbnail
Nicolas Grolleau,修改在14 年前。

RE: Liferay-Struts-ServiceBuilder

Junior Member 帖子: 90 加入日期: 09-11-12 最近的帖子
Yes, there is definitely a classpath issue when using liferay struts bridge and service builder.
That's why I gave up liferay struts bridge and switched to apache struts bridge.
There are plenty of things to change in the code to switch to apache struts, but at least there is no more classpath issue (the portlet doesn't need to be run in server classpath).