GeeCON Prague 2014*
The moose likes Portals and Portlets and the fly likes Is it possible to use Struts in a Portlet project (JSR 286) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Is it possible to use Struts in a Portlet project (JSR 286)" Watch "Is it possible to use Struts in a Portlet project (JSR 286)" New topic
Author

Is it possible to use Struts in a Portlet project (JSR 286)

Kjeld Sigtermans
Ranch Hand

Joined: Aug 10, 2006
Posts: 122
Hi,

I am not familiar with the combination struts and JSR 286 portlets.
Is it possible to:
1) use Struts 2 in a JSR 286 Portlet.
2) migrate a Struts 1 web application to a JSR 286 Portlet application.

In both cases, what do I need to accomplish this (using Eclipse IDE w/ Maven 2, and Liferay Portal). Do I need a plugin/dependency of some sort?

Thanks!
Kjeld


Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

i know you'll be sad reading this, but no struts 2 officially supports jsr 168 only.
But, you can use spring framework for jsr 286 support if you like to. The only drawback is you will be using Spring MVC which is bit cumbersome than struts 2 and has not much of any tag libraries.


SCJP 91%, SCWCD 97%
Kjeld Sigtermans
Ranch Hand

Joined: Aug 10, 2006
Posts: 122
Thanks.

The situation is that I have an existing Struts 2 web app which I need to migrate to a portlet application.
However meanwhile I understand that I am allowed to follow JSR 168 standard, so there's no (real) problem there. I noticed there is a Maven archetype 'struts2-archetype-portlet' which I can use to create a Struts2-JSR168-portlet project.
Having the existing Struts 2 app, are there any circumstances I need to consider when copying the code into the JSR168 portlet app (and without a doubt having to do some alterations)?

Cheers,
Kjeld
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I'm not sure if you have selected a server, but Liferay uses Struts extensively under the covers to produce their standard portlets.
The Community Edition and source code are available as downloads from liferay.com or sourceforge.
You could grab them and crack them open to have a look.
 
GeeCON Prague 2014
 
subject: Is it possible to use Struts in a Portlet project (JSR 286)