alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (portlet.xml)

This example Struts source code file (portlet.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

en, maps, maps, portlet, portlet2, struts, struts, strutsportlet, strutsportlet2, test, test, the, the, utf-8

The Struts portlet.xml source code

<?xml version="1.0" encoding="UTF-8"?>

<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"
    id="struts-portlet">

    <portlet id="StrutsPortlet">
        <description xml:lang="EN">Struts Test Portlet
        <portlet-name>StrutsPortlet
        <display-name xml:lang="EN">Struts Test Portlet
    
        <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

        <!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>viewNamespace
            <value>/view
        </init-param>

        <!-- The default action to invoke in view mode. -->
        <init-param>
            <name>defaultViewAction
            <value>index
        </init-param>

        <!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>editNamespace
            <value>/edit
        </init-param>

        <!-- The default action to invoke in edit mode. -->
        <init-param>
            <name>defaultEditAction
            <value>index
        </init-param>

        <!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>helpNamespace
            <value>/help
        </init-param>

        <!-- The default action to invoke in help mode. -->
        <init-param>
            <name>defaultHelpAction
            <value>index
        </init-param>
    
        <expiration-cache>0

        <supports>
            <mime-type>text/html
			<portlet-mode>view
            <portlet-mode>edit
            <portlet-mode>help
        </supports>

        <supported-locale>en

        <portlet-info>
            <title>My StrutsPortlet portlet
            <short-title>SP
            <keywords>struts,portlet
        </portlet-info>
    </portlet>
  
    <portlet id="StrutsPortlet2">
        <description xml:lang="EN">Struts Test Portlet2
        <portlet-name>StrutsPortlet2
        <display-name xml:lang="EN">Struts Test Portlet2
    
        <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

        <!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>viewNamespace
            <value>/view
        </init-param>

        <!-- The default action to invoke in view mode. -->
        <init-param>
            <name>defaultViewAction
            <value>index
        </init-param>

        <!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>editNamespace
            <value>/edit
        </init-param>

        <!-- The default action to invoke in edit mode. -->
        <init-param>
            <name>defaultEditAction
            <value>index
        </init-param>

        <!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
        <init-param>
            <name>helpNamespace
            <value>/help
        </init-param>

        <!-- The default action to invoke in help mode. -->
        <init-param>
            <name>defaultHelpAction
            <value>index
        </init-param>

        <expiration-cache>0

        <supports>
            <mime-type>text/html
            <portlet-mode>edit
            <portlet-mode>help
        </supports>

        <supported-locale>en

        <portlet-info>
            <title>My StrutsPortlet portlet2
            <short-title>SP2
            <keywords>struts,portlet
        </portlet-info>
    </portlet>

</portlet-app>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts portlet.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.