Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kjeld Sigtermans
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kjeld Sigtermans
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic