Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates for new JSR286 Support

...

Info

The Portlet Plugin

Excerpt

is used for developing JSR168 JSR286 portlets using Struts 2

.

portlet-class

To use the Struts 2 Portlet framework, use org.apache.struts2.portlet.dispatcher.Jsr168DispatcherJsr286Dispatcher as the portlet class in your portlet.xml file:

Code Block
titleportlet.xml
<portlet-app
   <?xml version="1.0" encoding="UTF-8"?>

    <portlet-app id="my-portlet-app"
	xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_12_0.xsd"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     version="2.0"
	xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_12_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_12_0.xsd"
    id="my-portlet-app">

    <portlet id="MyPortlet">
        <description xml:lang="EN">My Portlet</description>
        <portlet-name>MyPortlet</portlet-name>
        <display-name xml:lang="EN">my-portlet</display-name>
    
        <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher<Jsr286Dispatcher</portlet-class>
        
        <!-- SNIP -->

    </portlet>
</portlet-app>

...

Struts 2 Portlet Tutorial
JSR168 Specification
JSR286 Specification