You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "CRANFORD, CHRIS" <Ch...@setech.com> on 2014/07/31 21:50:43 UTC

Struts2 & Portlets

I currently have a Struts2 application deployed on Tomcat7 and I am looking to add some dashboard portlet functionality.  I noticed that Struts2 has a porlet plugin but was curious whether it was possible to configure the WAR with an embedded portal container so that users continued to access my application 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 & Portlets

Posted by tkofford <tk...@ku.edu>.
Hi Chris,

Almost all of our struts 2 development is to develop portlets, we use the
struts 2 portlet plugin a lot, and it works well for us. We even have a
couple of web applications where we use the same deployed *.war file for a
standalone webapp and a portlet webapp simultaneously.

We deploy our portlets to a pluto portlet container, so we simply add the
following in our pom.xml to have maven include the pluto-specific entries in
the web.xml that included in the resulting *.war file. It's the same build
process for portlet only and portlet + standalone webapp configurations.

>From the pom.xml ...

            
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                   
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
                </configuration>
            </plugin>

            
            <plugin>
                <groupId>org.apache.portals.pluto</groupId>
                <artifactId>maven-pluto-plugin</artifactId>
                <version>${pluto.version}</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

I hope that helps.

Todd Kofford
tkofford@ku.edu




--
View this message in context: http://struts.1045723.n5.nabble.com/Struts2-Portlets-tp5716471p5716475.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org