Author: bphillips
Date: Sun Jul 21 12:42:35 2013
New Revision: 1505372
URL: http://svn.apache.org/r1505372
Log:
Initial commit of a Struts 2 portlet project - see README.txt for how to build
and run
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/README.txt
struts/sandbox/trunk/Struts2HelloWorldPortlet/pom.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/DefaultAction.java
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/MessageService.java
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/applicationContext.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.dtd
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/struts.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/MANIFEST.MF
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/portlet.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/web.xml
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/index.html
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/hello.jsp
Added: struts/sandbox/trunk/Struts2HelloWorldPortlet/README.txt
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/README.txt?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/README.txt (added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/README.txt Sun Jul 21
12:42:35 2013
@@ -0,0 +1,50 @@
+This is an example of running a Struts 2 portlet using the pluto embedded
maven plugin with Jetty servlet container.
+
+To run the application use mvn jetty:run
+
+After Jetty starts up go to
http://localhost:8080/struts2helloworldportlet/pluto/index.jsp
+
+The key parts to get the application to run using the embedded pluto plugin
are:
+
+1. include this dependency in your pom.xml
+
+ <dependency>
+ <groupId>com.bekk.boss</groupId>
+ <artifactId>maven-jetty-pluto-embedded</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+
+2. include these plugins in your plugins section in pom.xml
+ (note the value of org.apache.pluto.embedded.portletIds is the portlet id
value from portlet.xml)
+
+ <plugin>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ <version>1.1.3</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.23</version>
+ <configuration>
+
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+
<webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
+ <systemProperties>
+ <systemProperty>
+ <name>org.apache.pluto.embedded.portletIds</name>
+ <value>struts2helloworldportlet</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+
+3. Include jetty-pluto-web-default.xml in WEB-INF
+
Added: struts/sandbox/trunk/Struts2HelloWorldPortlet/pom.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/pom.xml?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/pom.xml (added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/pom.xml Sun Jul 21 12:42:35
2013
@@ -0,0 +1,174 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>manning</groupId>
+ <artifactId>struts2helloworldportlet</artifactId>
+ <packaging>war</packaging>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>Struts 2 Hello World Portlet Example</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <app.name>${project.artifactId}</app.name>
+ <dist.home>${project.build.directory}</dist.home>
+ <!-- change the below to the location of your tomcat -->
+ <tomcat.dir>/apps/tomcat</tomcat.dir>
+ </properties>
+ <repositories>
+ <repository>
+ <id>bekk.boss</id>
+ <name>bekk.boxx</name>
+
<url>http://mvnrepository.com/artifact/com.bekk.boss/</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>2.3.15.1</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.portals</groupId>
+ <artifactId>portlet-api_2.0_spec</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.portals.pluto</groupId>
+ <artifactId>pluto-taglib</artifactId>
+ <version>2.0.0</version>
+ <type>jar</type>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-portlet-plugin</artifactId>
+ <version>2.3.15.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-spring-plugin</artifactId>
+ <version>2.3.15.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.bekk.boss</groupId>
+ <artifactId>maven-jetty-pluto-embedded</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+
+
+
+ </dependencies>
+
+
+ <build>
+ <finalName>struts2helloworldportlet</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+ </configuration>
+ <version>2.1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ <version>1.1.3</version>
+ <executions>
+ <execution>
+
<phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.23</version>
+ <configuration>
+
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+
<webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
+ <systemProperties>
+ <systemProperty>
+
<name>org.apache.pluto.embedded.portletIds</name>
+
<value>StrutsExample</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to
store Eclipse m2e settings only. It has no influence on the Maven build
itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+
<artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+
<pluginExecution>
+
<pluginExecutionFilter>
+
<groupId>
+
org.apache.pluto
+
</groupId>
+
<artifactId>
+
maven-pluto-plugin
+
</artifactId>
+
<versionRange>
+
[1.1.3,)
+
</versionRange>
+
<goals>
+
<goal>assemble</goal>
+
</goals>
+
</pluginExecutionFilter>
+ <action>
+
<ignore></ignore>
+
</action>
+
</pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/DefaultAction.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/DefaultAction.java?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/DefaultAction.java
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/DefaultAction.java
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,60 @@
+package com.struts2.tutorial.action;
+
+
+
+import org.apache.log4j.Logger;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+
+
+
+public class DefaultAction extends ActionSupport {
+
+ private static final Logger logger = Logger.getLogger(
DefaultAction.class.getName() ) ;
+
+ //injected by Spring
+ private MessageService messageService;
+
+ private String message ;
+
+
+ private static final long serialVersionUID = 1L;
+
+
+ public String execute() throws Exception {
+
+ logger.info("Execute method...");
+
+ message = messageService.getMessage() ;
+
+ return SUCCESS;
+
+ }
+
+
+
+
+
+
+ public MessageService getMessageService() {
+ return messageService;
+ }
+
+ public void setMessageService(MessageService messageService) {
+ this.messageService = messageService;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+
+ messageService.setMessage(message);
+
+ }
+
+
+
+}
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/MessageService.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/MessageService.java?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/MessageService.java
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/java/com/struts2/tutorial/action/MessageService.java
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,16 @@
+package com.struts2.tutorial.action;
+
+public class MessageService {
+
+ private String message;
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+}
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/applicationContext.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/applicationContext.xml?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/applicationContext.xml
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/applicationContext.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context"
+
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd
+ http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+ http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+ http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+
+
+ <bean id="messageService" class="com.struts2.tutorial.action.MessageService">
+ <property name="message" value="Default Hello" />
+ </bean>
+
+
+
+
+
+</beans>
+
+
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.dtd
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.dtd?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.dtd
(added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.dtd
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Authors: Chris Taylor, Ceki Gulcu. -->
+
+<!-- Version: 1.2 -->
+
+<!-- A configuration element consists of optional renderer
+elements,appender elements, categories and an optional root
+element. -->
+
+<!ELEMENT log4j:configuration (renderer*, appender*,plugin*,
(category|logger)*,root?,
+ (categoryFactory|loggerFactory)?)>
+
+<!-- The "threshold" attribute takes a level value below which -->
+<!-- all logging statements are disabled. -->
+
+<!-- Setting the "debug" enable the printing of internal log4j logging -->
+<!-- statements. -->
+
+<!-- By default, debug attribute is "null", meaning that we not do touch -->
+<!-- internal log4j logging settings. The "null" value for the threshold -->
+<!-- attribute can be misleading. The threshold field of a repository -->
+<!-- cannot be set to null. The "null" value for the threshold attribute -->
+<!-- simply means don't touch the threshold field, the threshold field -->
+<!-- keeps its old value. -->
+
+<!ATTLIST log4j:configuration
+ xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
+ threshold (all|trace|debug|info|warn|error|fatal|off|null)
"null"
+ debug (true|false|null) "null"
+ reset (true|false) "false"
+>
+
+<!-- renderer elements allow the user to customize the conversion of -->
+<!-- message objects to String. -->
+
+<!ELEMENT renderer EMPTY>
+<!ATTLIST renderer
+ renderedClass CDATA #REQUIRED
+ renderingClass CDATA #REQUIRED
+>
+
+<!-- Appenders must have a name and a class. -->
+<!-- Appenders may contain an error handler, a layout, optional parameters -->
+<!-- and filters. They may also reference (or include) other appenders. -->
+<!ELEMENT appender (errorHandler?, param*,
+ rollingPolicy?, triggeringPolicy?, connectionSource?,
+ layout?, filter*, appender-ref*)>
+<!ATTLIST appender
+ name CDATA #REQUIRED
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT layout (param*)>
+<!ATTLIST layout
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT filter (param*)>
+<!ATTLIST filter
+ class CDATA #REQUIRED
+>
+
+<!-- ErrorHandlers can be of any class. They can admit any number of -->
+<!-- parameters. -->
+
+<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)>
+<!ATTLIST errorHandler
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT root-ref EMPTY>
+
+<!ELEMENT logger-ref EMPTY>
+<!ATTLIST logger-ref
+ ref CDATA #REQUIRED
+>
+
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED
+>
+
+
+<!-- The priority class is org.apache.log4j.Level by default -->
+<!ELEMENT priority (param*)>
+<!ATTLIST priority
+ class CDATA #IMPLIED
+ value CDATA #REQUIRED
+>
+
+<!-- The level class is org.apache.log4j.Level by default -->
+<!ELEMENT level (param*)>
+<!ATTLIST level
+ class CDATA #IMPLIED
+ value CDATA #REQUIRED
+>
+
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named category. -->
+<!ELEMENT category (param*,(priority|level)?,appender-ref*)>
+<!ATTLIST category
+ class CDATA #IMPLIED
+ name CDATA #REQUIRED
+ additivity (true|false) "true"
+>
+
+<!-- If no level element is specified, then the configurator MUST not -->
+<!-- touch the level of the named logger. -->
+<!ELEMENT logger (level?,appender-ref*)>
+<!ATTLIST logger
+ name CDATA #REQUIRED
+ additivity (true|false) "true"
+>
+
+
+<!ELEMENT categoryFactory (param*)>
+<!ATTLIST categoryFactory
+ class CDATA #REQUIRED>
+
+<!ELEMENT loggerFactory (param*)>
+<!ATTLIST loggerFactory
+ class CDATA #REQUIRED>
+
+<!ELEMENT appender-ref EMPTY>
+<!ATTLIST appender-ref
+ ref CDATA #REQUIRED
+>
+
+<!-- plugins must have a name and class and can have optional parameters -->
+<!ELEMENT plugin (param*, connectionSource?)>
+<!ATTLIST plugin
+ name CDATA #REQUIRED
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT connectionSource (dataSource?, param*)>
+<!ATTLIST connectionSource
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT dataSource (param*)>
+<!ATTLIST dataSource
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT triggeringPolicy ((param|filter)*)>
+<!ATTLIST triggeringPolicy
+ name CDATA #IMPLIED
+ class CDATA #REQUIRED
+>
+
+<!ELEMENT rollingPolicy (param*)>
+<!ATTLIST rollingPolicy
+ name CDATA #IMPLIED
+ class CDATA #REQUIRED
+>
+
+
+<!-- If no priority element is specified, then the configurator MUST not -->
+<!-- touch the priority of root. -->
+<!-- The root category always exists and cannot be subclassed. -->
+<!ELEMENT root (param*, (priority|level)?, appender-ref*)>
+
+
+<!-- ==================================================================== -->
+<!-- A logging event -->
+<!-- ==================================================================== -->
+<!ELEMENT log4j:eventSet (log4j:event*)>
+<!ATTLIST log4j:eventSet
+ xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
+ version (1.1|1.2) "1.2"
+ includesLocationInfo (true|false) "true"
+>
+
+
+
+<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
+ log4j:locationInfo?, log4j:properties?) >
+
+<!-- The timestamp format is application dependent. -->
+<!ATTLIST log4j:event
+ logger CDATA #REQUIRED
+ level CDATA #REQUIRED
+ thread CDATA #REQUIRED
+ timestamp CDATA #REQUIRED
+ time CDATA #IMPLIED
+>
+
+<!ELEMENT log4j:message (#PCDATA)>
+<!ELEMENT log4j:NDC (#PCDATA)>
+
+<!ELEMENT log4j:throwable (#PCDATA)>
+
+<!ELEMENT log4j:locationInfo EMPTY>
+<!ATTLIST log4j:locationInfo
+ class CDATA #REQUIRED
+ method CDATA #REQUIRED
+ file CDATA #REQUIRED
+ line CDATA #REQUIRED
+>
+
+<!ELEMENT log4j:properties (log4j:data*)>
+
+<!ELEMENT log4j:data EMPTY>
+<!ATTLIST log4j:data
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED
+>
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.xml?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.xml
(added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/log4j.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration PUBLIC "-//log4j/log4j Configuration//EN"
"log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p %c.%M:%L - %m%n"/>
+ </layout>
+ </appender>
+
+
+ <!-- specify the logging level for loggers from other libraries -->
+ <logger name="com.opensymphony">
+ <level value="WARN" />
+ </logger>
+
+ <logger name="org.apache.struts2">
+ <level value="WARN" />
+ </logger>
+
+ <!-- log only debug and above messages for loggers with
+ a name of the name value below -->
+ <logger name="com.struts2.tutorial">
+ <level value="DEBUG" />
+ </logger>
+
+
+
+ <!-- for all other loggers log only warn and above log messages -->
+ <root>
+ <priority value="WARN"/>
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</log4j:configuration>
+
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/struts.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/struts.xml?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/struts.xml
(added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/resources/struts.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
+<struts>
+
+ <include file="struts-portlet-default.xml"/>
+
+ <package name="view" extends="struts-portlet-default"
+ namespace="/view">
+ <action name="index"
class="com.struts2.tutorial.action.DefaultAction">
+ <result name="success">/portlet/hello.jsp</result>
+ </action>
+ </package>
+
+
+</struts>
\ No newline at end of file
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/MANIFEST.MF
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/MANIFEST.MF?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/MANIFEST.MF
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/META-INF/MANIFEST.MF
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,505 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!-- ===================================================================== -->
+<!-- This file contains the default descriptor for web applications. -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- The intent of this descriptor is to include jetty specific or common -->
+<!-- configuration for all webapps. If a context has a webdefault.xml -->
+<!-- descriptor, it is applied before the contexts own web.xml file -->
+<!-- -->
+<!-- A context may be assigned a default descriptor by: -->
+<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
+<!-- + Passed an arg to addWebApplications -->
+<!-- -->
+<!-- This file is used both as the resource within the jetty.jar (which is -->
+<!-- used as the default if no explicit defaults descriptor is set) and it -->
+<!-- is copied to the etc directory of the Jetty distro and explicitly -->
+<!-- by the jetty.xml file. -->
+<!-- -->
+<!-- ===================================================================== -->
+<web-app
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ metadata-complete="true"
+ version="2.5">
+
+ <description>
+ Default web.xml file.
+ This file is applied to a Web application before it's own
WEB_INF/web.xml file
+ </description>
+
+ <!-- ====================================================================
-->
+ <!-- Context params to control Session Cookies
-->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
+ <!-- UNCOMMENT TO ACTIVATE
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
+ <param-value>127.0.0.1</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+ <param-value>/</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
+ <param-value>-1</param-value>
+ </context-param>
+ -->
+
+ <context-param>
+ <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
+ <param-value>
+
start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar
+ </param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+
com.bekk.boss.pluto.embedded.jetty.util.OverrideContextLoaderListener
+ </listener-class>
+ </listener>
+ <listener>
+ <listener-class>
+ com.bekk.boss.pluto.embedded.util.PortalStartupListener
+ </listener-class>
+ </listener>
+ <filter>
+ <filter-name>plutoResourceFilter</filter-name>
+
<filter-class>com.bekk.boss.pluto.embedded.util.PlutResourcesFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>plutoPortalDriver</filter-name>
+
<filter-class>com.bekk.boss.pluto.embedded.util.PlutoPortalDriverFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>plutoResourceFilter</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>plutoResourceFilter</filter-name>
+ <url-pattern>*.gif</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>plutoResourceFilter</filter-name>
+ <url-pattern>*.png</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>plutoResourceFilter</filter-name>
+ <url-pattern>*.js</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>plutoPortalDriver</filter-name>
+ <url-pattern>/pluto/index.jsp</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>plutoPortalDriver</filter-name>
+ <url-pattern>/pluto/index.jsp/*</url-pattern>
+ </filter-mapping>
+
+ <!-- ====================================================================
-->
+ <!-- The default servlet.
-->
+ <!-- This servlet, normally mapped to /, provides the handling for static
-->
+ <!-- content, OPTIONS and TRACE methods for the context.
-->
+ <!-- The following initParameters are supported:
-->
+ <!--
-->
+ <!-- acceptRanges If true, range requests and responses are
-->
+ <!-- supported
-->
+ <!--
-->
+ <!-- dirAllowed If true, directory listings are returned if no
-->
+ <!-- welcome file is found. Else 403 Forbidden.
-->
+ <!--
-->
+ <!-- redirectWelcome If true, redirect welcome file requests
-->
+ <!-- else use request dispatcher forwards
-->
+ <!--
-->
+ <!-- gzip If set to true, then static content will be
served-->
+ <!-- as gzip content encoded if a matching resource is
-->
+ <!-- found ending with ".gz"
-->
+ <!--
-->
+ <!-- resoureBase Can be set to replace the context resource base
-->
+ <!--
-->
+ <!-- relativeResourceBase
-->
+ <!-- Set with a pathname relative to the base of the
-->
+ <!-- servlet context root. Useful for only serving
-->
+ <!-- static content from only specific subdirectories.
-->
+ <!--
-->
+ <!-- useFileMappedBuffer
-->
+ <!-- If set to true (the default), a memory mapped
-->
+ <!-- file buffer will be used to serve static content
-->
+ <!-- when using an NIO connector. Setting this value
-->
+ <!-- to false means that a direct buffer will be used
-->
+ <!-- instead. If you are having trouble with Windows
-->
+ <!-- file locking, set this to false.
-->
+ <!--
-->
+ <!-- cacheControl If set, all static content will have this value
-->
+ <!-- set as the cache-control header.
-->
+ <!--
-->
+ <!-- maxCacheSize Maximum size of the static resource cache
-->
+ <!--
-->
+ <!-- maxCachedFileSize Maximum size of any single file in the cache
-->
+ <!--
-->
+ <!-- maxCachedFiles Maximum number of files in the cache
-->
+ <!--
-->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
+ <servlet>
+ <servlet-name>default</servlet-name>
+ <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
+ <init-param>
+ <param-name>acceptRanges</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>dirAllowed</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>redirectWelcome</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCacheSize</param-name>
+ <param-value>4000000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCachedFileSize</param-name>
+ <param-value>254000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCachedFiles</param-name>
+ <param-value>1000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>gzip</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>useFileMappedBuffer</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <!--
+ <init-param>
+ <param-name>cacheControl</param-name>
+ <param-value>max-age=3600,public</param-value>
+ </init-param>
+ -->
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- ====================================================================
-->
+ <!-- JSP Servlet
-->
+ <!-- This is the jasper JSP servlet from the jakarta project
-->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
+ <!-- The JSP page compiler and execution servlet, which is the mechanism
-->
+ <!-- used by Glassfish to support JSP pages. Traditionally, this servlet
-->
+ <!-- is mapped to URL patterh "*.jsp". This servlet supports the
-->
+ <!-- following initialization parameters (default values are in square
-->
+ <!-- brackets):
-->
+ <!--
-->
+ <!-- checkInterval If development is false and reloading is true,
-->
+ <!-- background compiles are enabled. checkInterval
-->
+ <!-- is the time in seconds between checks to see
-->
+ <!-- if a JSP page needs to be recompiled. [300]
-->
+ <!--
-->
+ <!-- compiler Which compiler Ant should use to compile JSP
-->
+ <!-- pages. See the Ant documenation for more
-->
+ <!-- information. [javac]
-->
+ <!--
-->
+ <!-- classdebuginfo Should the class file be compiled with
-->
+ <!-- debugging information? [true]
-->
+ <!--
-->
+ <!-- classpath What class path should I use while compiling
-->
+ <!-- generated servlets? [Created dynamically
-->
+ <!-- based on the current web application]
-->
+ <!-- Set to ? to make the container explicitly set
-->
+ <!-- this parameter.
-->
+ <!--
-->
+ <!-- development Is Jasper used in development mode (will check
-->
+ <!-- for JSP modification on every access)? [true]
-->
+ <!--
-->
+ <!-- enablePooling Determines whether tag handler pooling is
-->
+ <!-- enabled [true]
-->
+ <!--
-->
+ <!-- fork Tell Ant to fork compiles of JSP pages so that
-->
+ <!-- a separate JVM is used for JSP page compiles
-->
+ <!-- from the one Tomcat is running in. [true]
-->
+ <!--
-->
+ <!-- ieClassId The class-id value to be sent to Internet
-->
+ <!-- Explorer when using <jsp:plugin> tags.
-->
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]
-->
+ <!--
-->
+ <!-- javaEncoding Java file encoding to use for generating java
-->
+ <!-- source files. [UTF-8]
-->
+ <!--
-->
+ <!-- keepgenerated Should we keep the generated Java source code
-->
+ <!-- for each page instead of deleting it? [true]
-->
+ <!--
-->
+ <!-- logVerbosityLevel The level of detailed messages to be produced
-->
+ <!-- by this servlet. Increasing levels cause the
-->
+ <!-- generation of more messages. Valid values are
-->
+ <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG.
-->
+ <!-- [WARNING]
-->
+ <!--
-->
+ <!-- mappedfile Should we generate static content with one
-->
+ <!-- print statement per input line, to ease
-->
+ <!-- debugging? [false]
-->
+ <!--
-->
+ <!--
-->
+ <!-- reloading Should Jasper check for modified JSPs? [true]
-->
+ <!--
-->
+ <!-- suppressSmap Should the generation of SMAP info for JSR45
-->
+ <!-- debugging be suppressed? [false]
-->
+ <!--
-->
+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be
-->
+ <!-- dumped to a file? [false]
-->
+ <!-- False if suppressSmap is true
-->
+ <!--
-->
+ <!-- scratchdir What scratch directory should we use when
-->
+ <!-- compiling JSP pages? [default work directory
-->
+ <!-- for the current web application]
-->
+ <!--
-->
+ <!-- tagpoolMaxSize The maximum tag handler pool size [5]
-->
+ <!--
-->
+ <!-- xpoweredBy Determines whether X-Powered-By response
-->
+ <!-- header is added by generated servlet [false]
-->
+ <!--
-->
+ <!-- If you wish to use Jikes to compile JSP pages:
-->
+ <!-- Set the init parameter "compiler" to "jikes". Define
-->
+ <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty
-->
+ <!-- to cause Jikes to emit error messages in a format compatible with
-->
+ <!-- Jasper.
-->
+ <!-- If you get an error reporting that jikes can't use UTF-8 encoding,
-->
+ <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1".
-->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
+ <servlet id="jsp">
+ <servlet-name>jsp</servlet-name>
+
<servlet-class>com.bekk.boss.pluto.embedded.util.PortletJspServlet</servlet-class>
+ <init-param>
+ <param-name>logVerbosityLevel</param-name>
+ <param-value>DEBUG</param-value>
+ </init-param>
+ <init-param>
+ <param-name>fork</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>xpoweredBy</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <!--
+ <init-param>
+ <param-name>classpath</param-name>
+ <param-value>?</param-value>
+ </init-param>
+ -->
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ <url-pattern>*.jspf</url-pattern>
+ <url-pattern>*.jspx</url-pattern>
+ <url-pattern>*.xsp</url-pattern>
+ <url-pattern>*.JSP</url-pattern>
+ <url-pattern>*.JSPF</url-pattern>
+ <url-pattern>*.JSPX</url-pattern>
+ <url-pattern>*.XSP</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- ====================================================================
-->
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <!-- ====================================================================
-->
+ <!-- Default MIME mappings
-->
+ <!-- The default MIME mappings are provided by the mime.properties
-->
+ <!-- resource in the org.mortbay.jetty.jar file. Additional or modified
-->
+ <!-- mappings may be specified here
-->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
+ <!-- UNCOMMENT TO ACTIVATE
+ <mime-mapping>
+ <extension>mysuffix</extension>
+ <mime-type>mymime/type</mime-type>
+ </mime-mapping>
+ -->
+
+ <!-- ====================================================================
-->
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <!-- ====================================================================
-->
+ <locale-encoding-mapping-list>
+ <locale-encoding-mapping>
+ <locale>ar</locale>
+ <encoding>ISO-8859-6</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>be</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>bg</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>ca</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>cs</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>da</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>de</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>el</locale>
+ <encoding>ISO-8859-7</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>en</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>es</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>et</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>fi</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>fr</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>hr</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>hu</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>is</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>it</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>iw</locale>
+ <encoding>ISO-8859-8</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>ja</locale>
+ <encoding>Shift_JIS</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>ko</locale>
+ <encoding>EUC-KR</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>lt</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>lv</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>mk</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>nl</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>no</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>pl</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>pt</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>ro</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>ru</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sh</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sk</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sl</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sq</locale>
+ <encoding>ISO-8859-2</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sr</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>sv</locale>
+ <encoding>ISO-8859-1</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>tr</locale>
+ <encoding>ISO-8859-9</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>uk</locale>
+ <encoding>ISO-8859-5</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>zh</locale>
+ <encoding>GB2312</encoding>
+ </locale-encoding-mapping>
+ <locale-encoding-mapping>
+ <locale>zh_TW</locale>
+ <encoding>Big5</encoding>
+ </locale-encoding-mapping>
+ </locale-encoding-mapping-list>
+
+</web-app>
+
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/portlet.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/portlet.xml?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/portlet.xml
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/portlet.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<portlet-app 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' version='1.0'>
+<portlet id="StrutsExample">
+ <description xml:lang="EN">Simple hello world portlet using Struts
2</description>
+ <!-- matches fname value in uPortal channel definition -->
+ <portlet-name>StrutsExample</portlet-name>
+ <display-name xml:lang="EN">Struts Example</display-name>
+
+
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
+
+ <!-- The namespace for the actions configured for view mode -->
+ <init-param>
+ <name>viewNamespace</name>
+ <value>/view</value>
+ </init-param>
+
+ <!-- The default action to invoke in view mode. -->
+ <init-param>
+ <name>defaultViewAction</name>
+ <value>index</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+
+ <portlet-info>
+ <title>Struts Example</title>
+ </portlet-info>
+ </portlet>
+
+</portlet-app>
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/web.xml?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/web.xml
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/WEB-INF/web.xml
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app id="StrutsExample">
+ <display-name>Struts Portlet Example</display-name>
+
+
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath:applicationContext.xml</param-value>
+ </context-param>
+
+ <listener>
+
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+</web-app>
Added: struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/index.html
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/index.html?rev=1505372&view=auto
==============================================================================
--- struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/index.html
(added)
+++ struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/index.html
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
+<html>
+<head>
+<title>Redirecting</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.action">
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file
Added:
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/hello.jsp
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/hello.jsp?rev=1505372&view=auto
==============================================================================
---
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/hello.jsp
(added)
+++
struts/sandbox/trunk/Struts2HelloWorldPortlet/src/main/webapp/portlet/hello.jsp
Sun Jul 21 12:42:35 2013
@@ -0,0 +1,15 @@
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<h3><s:property value="message" /> </h3>
+
+<h4>Create Your Own Message</h4>
+
+<s:form action="index" method="post">
+
+<s:textfield name="message" label="Enter your message" />
+
+<s:submit />
+
+</s:form>
+
+