[jboss-user] [JBoss Portal] - Re: Porlet Tutorial WebWork 2.2

BenS do-not-reply at jboss.com
Wed Oct 8 13:15:20 EDT 2008


I have included the code for portlet.xml and MyPortlet-object.xml.  However, there is no portlet-instances.xml code in this tutorial or I'm not sure which file it would be in.  The other xml files that exist under WEB-INF are jboss-app.xml, jboss-portlet.xml, and web.xml.  

The tutorial is located at the following site:  http://struts.apache.org/2.0.11/docs/portlet-tutorial-webwork-22.html

portlet.xml

<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
  |          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
  |   <portlet>
  |     <description xml:lang="EN">My very first WebWork Portlet</description>
  |     <portlet-name>MyPortlet</portlet-name>
  |     <display-name xml:lang="EN">My first WebWork Portlet</display-name>
  | 
  |     <portlet-class>com.opensymphony.webwork.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
  | 
  |     <init-param>
  |       <!-- The view mode namespace. Maps to a namespace in the xwork config file -->
  |       <name>viewNamespace</name>
  |       <value>/view</value>
  |     </init-param>
  |     <init-param>
  |       <!-- The default action to invoke in view mode -->
  |       <name>defaultViewAction</name>
  |       <value>index</value>
  |     </init-param>
  | 
  |     <expiration-cache>0</expiration-cache>
  | 
  |     <supports>
  |       <mime-type>text/html</mime-type>
  |     </supports>
  | 
  |     <supported-locale>en</supported-locale>
  | 
  |     <portlet-info>
  |       <title>My very own WebWork Portlet</title>
  |       <short-title>WWPortlet</short-title>
  |       <keywords>webwork,portlet</keywords>
  |     </portlet-info>
  |   </portlet>
  | </portlet-app>

MyPortlet-object.xml

<?xml version="1.0" encoding="UTF-8"?>
  | <deployments>
  | 	<deployment>
  | 		<if-exists>overwrite</if-exists>
  | 		<parent-ref>default</parent-ref>
  | 		<properties />
  | 		<page>
  | 			<page-name>MyPortlet Tutorial</page-name>
  | 			<properties />
  | 			<window>
  | 				<window-name>MyPortletWindow</window-name>
  | 				<instance-ref>MyPortletInstance</instance-ref>
  | 				<region>center</region>
  | 				<height>0</height>
  | 			</window>
  | 		</page>
  | 	</deployment>
  | 	<deployment>
  | 		<if-exists>overwrite</if-exists>
  | 		<instance>
  | 			<instance-name>MyPortletInstance</instance-name>
  | 			<component-ref>MyPortlet.MyPortlet</component-ref>
  | 		</instance>
  | 	</deployment>
  | </deployments>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181086#4181086

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181086



More information about the jboss-user mailing list