You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2010/05/26 22:20:58 UTC
svn commit: r948569 [11/12] - in /myfaces/portlet-bridge/core/trunk: ./
api/src/main/java/javax/portlet/faces/component/ examples/
examples/carstore/ examples/carstore/src/ examples/carstore/src/main/
examples/carstore/src/main/java/ examples/carstore/...
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMyFacesRenderFilter.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMyFacesRenderFilter.java?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMyFacesRenderFilter.java (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMyFacesRenderFilter.java Wed May 26 20:20:51 2010
@@ -0,0 +1,423 @@
+package org.apache.myfaces.portlet.faces.application;
+
+import org.apache.myfaces.application.jsp.ViewResponseWrapper;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+
+import java.nio.ByteBuffer;
+
+import javax.portlet.faces.Bridge;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+public class BridgeMyFacesRenderFilter
+ implements Filter
+{
+ public BridgeMyFacesRenderFilter()
+ {
+ }
+
+ public void init(FilterConfig config)
+ {
+
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain)
+ throws IOException, ServletException
+ {
+ // only do any work if attribute set indicates we should
+ Boolean renderAfter =
+ (Boolean) request.getAttribute(Bridge.RENDER_CONTENT_AFTER_VIEW);
+ if (renderAfter == null || renderAfter == Boolean.FALSE)
+ {
+ chain.doFilter(request, response);
+ return;
+ }
+
+ // otherwise try and support render after
+ BridgeRenderFilterResponseWrapper wrapped =
+ new BridgeRenderFilterResponseWrapper((HttpServletResponse) response);
+
+ chain.doFilter(request, wrapped);
+
+ // wrap the response as a JSF RI wrapped response
+ // execute the chain
+ // Follow the JSTL 1.2 spec, section 7.4,
+ // on handling status codes on a forward
+ if (wrapped.getStatus() < 200 || wrapped.getStatus() > 299)
+ {
+ // flush the contents of the wrapper to the response
+ // this is necessary as the user may be using a custom
+ // error page - this content should be propagated
+ if (wrapped.isChars())
+ {
+ PrintWriter writer = response.getWriter();
+ writer.print(wrapped.getChars());
+ writer.flush();
+ }
+ else
+ {
+ ServletOutputStream stream = response.getOutputStream();
+ stream.write(wrapped.getBytes());
+ stream.flush();
+ }
+ }
+ else
+ {
+ // Put the AFTER_VIEW_CONTENT into request scope temporarily
+ // Check both bytes and chars as we don't know how the dispatchee
+ // deals with the Output.
+ request.setAttribute(Bridge.AFTER_VIEW_CONTENT,
+ (wrapped.isChars())? (Object) wrapped.getChars():
+ wrapped.getBytes());
+ }
+ }
+
+ public void destroy()
+ {
+
+ }
+
+ // Inner classes -- implements buffered response wrapper
+
+
+ /**
+ * <p>This class is used by {@link javax.faces.application.ViewHandler#createView} to obtain the
+ * text that exists after the <f:view> tag.</p>
+ */
+ public class BridgeRenderFilterResponseWrapper
+ extends ViewResponseWrapper
+ {
+
+ private DirectByteArrayServletOutputStream mByteStream;
+ private CharArrayWriter mCharWriter;
+ private PrintWriter mPrintWriter;
+ private int mStatus = HttpServletResponse.SC_OK;
+
+
+ public BridgeRenderFilterResponseWrapper(HttpServletResponse wrapped)
+ {
+ super(wrapped);
+ }
+
+ public void flushBuffer()
+ {
+ if (isChars())
+ {
+ mPrintWriter.flush();
+ }
+ }
+
+ public int getBufferSize()
+ {
+ if (isBytes())
+ {
+ return mByteStream.size();
+ }
+ else
+ {
+ return mCharWriter.size();
+ }
+ }
+
+
+ public void reset()
+ {
+ super.reset();
+ if (isBytes())
+ {
+ mByteStream.reset();
+ }
+ else
+ {
+ mPrintWriter.flush();
+ mCharWriter.reset();
+ }
+ }
+
+ public void resetBuffer()
+ {
+ super.resetBuffer();
+ if (isBytes())
+ {
+ mByteStream.reset();
+ }
+ else
+ {
+ mPrintWriter.flush();
+ mCharWriter.reset();
+ }
+ }
+
+
+ public ServletOutputStream getOutputStream()
+ throws IOException
+ {
+ if (mPrintWriter != null)
+ {
+ throw new IllegalStateException();
+ }
+ if (mByteStream == null)
+ {
+ mByteStream = new DirectByteArrayServletOutputStream();
+ }
+ return mByteStream;
+ }
+
+ public PrintWriter getWriter()
+ throws IOException
+ {
+ if (mByteStream != null)
+ {
+ throw new IllegalStateException();
+ }
+ if (mPrintWriter == null)
+ {
+ mCharWriter = new CharArrayWriter(4096);
+ mPrintWriter = new PrintWriter(mCharWriter);
+ }
+
+ return mPrintWriter;
+ }
+
+ @Override
+ public void sendError(int status, String msg)
+ throws IOException
+ {
+ super.sendError(status, msg);
+ // preserve status so can reply to getStatus()
+ mStatus = status;
+ }
+
+ @Override
+ public void sendError(int status)
+ throws IOException
+ {
+ super.sendError(status);
+ // preserve status so can reply to getStatus()
+ mStatus = status;
+ }
+
+ @Override
+ public void setStatus(int sc)
+ {
+ super.setStatus(sc);
+ // preserve status so can reply to getStatus()
+ mStatus = sc;
+ }
+
+ @Override
+ public void setStatus(int sc, String sm)
+ {
+ super.setStatus(sc, sm);
+ // preserve status so can reply to getStatus()
+ mStatus = sc;
+ }
+
+
+ public int getStatus()
+ {
+ return mStatus;
+ }
+
+ public boolean isBytes()
+ {
+ return (mByteStream != null);
+ }
+
+ public boolean isChars()
+ {
+ return (mCharWriter != null);
+ }
+
+ public byte[] getBytes()
+ {
+ if (isBytes())
+ {
+ return mByteStream.toByteArray();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public char[] getChars()
+ {
+ if (isChars())
+ {
+ mCharWriter.flush();
+ return mCharWriter.toCharArray();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public String toString()
+ {
+ if (isChars())
+ {
+ mCharWriter.flush();
+ return mCharWriter.toString();
+ }
+ else
+ {
+ return mByteStream.toString();
+ }
+ }
+
+ public void clearWrappedResponse() throws IOException {
+ resetBuffers();
+ }
+
+ /**
+ * Flush the current buffered content to the wrapped
+ * response (this could be a Servlet or Portlet response)
+ * @throws IOException if content cannot be written
+ */
+ public void flushContentToWrappedResponse()
+ throws IOException
+ {
+ ServletResponse response = getResponse();
+
+ flushBuffer();
+
+ if (isBytes())
+ {
+ response.getOutputStream().write(getBytes());
+ mByteStream.reset();
+ }
+ else
+ {
+ response.getWriter().write(getChars());
+ mCharWriter.reset();
+ }
+
+ }
+
+ /**
+ * Flush the current buffered content to the provided <code>Writer</code>
+ * @param writer target <code>Writer</code>
+ * @param encoding the encoding that should be used
+ * @throws IOException if content cannot be written
+ */
+ public void flushToWriter(Writer writer, String encoding)
+ throws IOException
+ {
+ flushBuffer();
+
+ if (isBytes())
+ {
+ throw new IOException("Invalid flushToWriter as the code is writing bytes to an OutputStream.");
+ }
+ else
+ {
+ writer.write(getChars());
+ mCharWriter.reset();
+ }
+ }
+
+ /**
+ * Clear the internal buffers.
+ * @throws IOException if some odd error occurs
+ */
+ public void resetBuffers()
+ throws IOException
+ {
+ if (isBytes())
+ {
+ mByteStream.reset();
+ }
+ else
+ {
+ mPrintWriter.flush();
+ mCharWriter.reset();
+ }
+ }
+
+ }
+
+
+ // ----------------------------------------------------------- Inner Classes
+
+
+ private class DirectByteArrayServletOutputStream
+ extends ServletOutputStream
+ {
+ private DirectByteArrayOutputStream mByteArrayOutputStream;
+
+ public DirectByteArrayServletOutputStream()
+ {
+ mByteArrayOutputStream = new DirectByteArrayOutputStream(4096);
+ }
+
+ public void write(int n)
+ {
+ mByteArrayOutputStream.write(n);
+ }
+
+ public byte[] toByteArray()
+ {
+ return mByteArrayOutputStream.toByteArray();
+ }
+
+ public int size()
+ {
+ return mByteArrayOutputStream.size();
+ }
+
+ public void reset()
+ {
+ mByteArrayOutputStream.reset();
+ }
+
+ }
+
+
+ private class DirectByteArrayOutputStream
+ extends ByteArrayOutputStream
+ {
+
+
+ // -------------------------------------------------------- Constructors
+
+
+ public DirectByteArrayOutputStream(int initialCapacity)
+ {
+ super(initialCapacity);
+ }
+
+
+ // ------------------------------------------------------- PublicMethods
+
+
+ /**
+ * Return the buffer backing this ByteArrayOutputStream as a
+ * ByteBuffer.
+ * @return buf wrapped in a ByteBuffer
+ */
+ public ByteBuffer getByteBuffer()
+ {
+ return (ByteBuffer.wrap(buf, 0, count));
+ }
+
+ }
+
+
+ // end of class BridgeRenderFilterResponseWrapper
+}
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/resources/META-INF/NOTICE?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/resources/META-INF/NOTICE (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/resources/META-INF/NOTICE Wed May 26 20:20:51 2010
@@ -0,0 +1,20 @@
+Apache MyFaces Portlet Bridge
+Copyright [2007, 2008, 2009] The Apache Software Foundation
+
+This is an implementation of a public review specification
+developed under the Java Community Process (JCP). This
+implementation may not fully conform to this specification.
+This implementation may differ from the final specification.
+The code is not compatible with any specification of the JCP.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software are Copyright (c) 2007, Oracle
+Corporation, <http://www.oracle.com/> and are licensed to
+the Apache Software Foundation under the "Software Grant
+and Corporate Contribution License Agreement"
+
+See the LICENSE.txt file for information on all licenses
+associated with this software.
+
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/faces-config.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/faces-config.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,132 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<faces-config 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-facesconfig_1_2.xsd"
+ version="1.2">
+
+ <application>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>es</supported-locale>
+ </locale-config>
+ </application>
+
+ <navigation-rule>
+ <description>
+ The decision rule used by the NavigationHandler to
+ determine which view must be displayed after the
+ current view, greeting.jsp is processed.
+ </description>
+ <from-view-id>/greeting.jsp</from-view-id>
+ <navigation-case>
+ <description>
+ Indicates to the NavigationHandler that the response.jsp
+ view must be displayed if the Action referenced by a
+ UICommand component on the greeting.jsp view returns
+ the outcome "success".
+ </description>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/response.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description>
+ The decision rules used by the NavigationHandler to
+ determine which view must be displayed after the
+ current view, response.jsp is processed.
+ </description>
+ <from-view-id>/response.jsp</from-view-id>
+ <navigation-case>
+ <description>
+ Indicates to the NavigationHandler that the greeting.jsp
+ view must be displayed if the Action referenced by a
+ UICommand component on the response.jsp view returns
+ the outcome "success".
+ </description>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/greeting.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <managed-bean>
+ <description>
+ The "backing file" bean that backs up the guessNumber webapp
+ </description>
+ <managed-bean-name>UserNumberBean</managed-bean-name>
+ <managed-bean-class>guessNumber.UserNumberBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>minimum</property-name>
+ <property-class>int</property-class>
+ <value>1</value>
+ </managed-property>
+ <managed-property>
+ <property-name>maximum</property-name>
+ <property-class>int</property-class>
+ <value>10</value>
+ </managed-property>
+
+ </managed-bean>
+
+ <managed-bean>
+ <description>
+ The "backing file" bean that backs up the guessNumber webapp
+ </description>
+ <managed-bean-name>requestBean</managed-bean-name>
+ <managed-bean-class>guessNumber.UserNumberBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>minimum</property-name>
+ <property-class>int</property-class>
+ <value>12</value>
+ </managed-property>
+ <managed-property>
+ <property-name>maximum</property-name>
+ <property-class>int</property-class>
+ <value>22</value>
+ </managed-property>
+
+ </managed-bean>
+
+
+</faces-config>
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+
+-->
+
+<!-- This web.xml file is used in order to configure pluto to run with jetty in order to test the appropriate web applications -->
+<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">
+
+ <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>
+
+ <!-- Listeners -->
+ <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>
+
+ <!-- Filters and Mappings -->
+ <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>
+ <url-pattern>*.gif</url-pattern>
+ <url-pattern>*.png</url-pattern>
+ <url-pattern>*.js</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>plutoPortalDriver</filter-name>
+ <url-pattern>/pluto/index.jsp</url-pattern>
+ <url-pattern>/pluto/index.jsp/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Servlets and Mappings -->
+
+ <!--
+ 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>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <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>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <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>
+
+ <!-- Other settings -->
+ <session-config>
+ <session-timeout>60</session-timeout>
+ </session-config>
+
+ <welcome-file-list>
+ <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: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/portlet.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/portlet.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/portlet.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<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 lang="EN">Mojarra Guess Number Portlet</description>
+ <portlet-name>portlet-bridge-guessNumber-jsp-myFacesFilter</portlet-name>
+ <display-name lang="EN">Mojarra Guess Number </display-name>
+ <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/greeting.jsp</value>
+ </init-param>
+
+ <init-param>
+ <name>javax.portlet.faces.excludedRequestAttributes</name>
+ <value>com.sun.faces.*, org.apache.myfaces.trinidad.*</value>
+ </init-param>
+
+ <supports>
+ <mime-type>application/xhtml+xml</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+
+ <portlet-info>
+ <title>Mojarra Guess Number </title>
+ <short-title>Guess Number </short-title>
+ </portlet-info>
+
+ </portlet>
+
+
+</portlet-app>
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/web.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/web.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,108 @@
+<?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">
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<web-app>
+
+ <display-name>JavaServer Faces Guess Number Sample Application
+ </display-name>
+ <description>
+ JavaServer Faces Guess Number Sample Application
+ </description>
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>mojarraRenderBehindPortletFilter</filter-name>
+ <filter-class>org.apache.myfaces.portlet.faces.application.BridgeMyFacesRenderFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>mojarraRenderBehindPortletFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <jsp-config>
+ <jsp-property-group>
+ <url-pattern>*.jsp</url-pattern>
+ <is-xml>true</is-xml>
+ </jsp-property-group>
+ </jsp-config>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+
+
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/guess/*</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <!-- This security constraint illustrates how JSP pages
+with JavaServer Faces components can be protected from
+being accessed without going through the Faces Servlet.
+The security constraint ensures that the Faces Servlet will
+be used or the pages will not be processed. -->
+ <display-name>Restrict access to JSP pages</display-name>
+ <web-resource-collection>
+ <web-resource-name>
+ Restrict access to JSP pages
+ </web-resource-name>
+ <url-pattern>/greeting.jsp</url-pattern>
+ <url-pattern>/response.jsp</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <description>
+ With no roles defined, no access granted
+ </description>
+ </auth-constraint>
+ </security-constraint>
+
+</web-app>
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/greeting.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/greeting.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/greeting.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/greeting.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,82 @@
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xml:lang="en" lang="en">
+<jsp:output doctype-root-element="html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+<jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/>
+<head>
+ <title>Hello</title>
+</head>
+<body bgcolor="white">
+<f:view>
+ <h:form id="helloForm">
+ <h2>Hi. My name is Duke. I'm thinking of a number from
+ <h:outputText lang="en_US" value="#{UserNumberBean.minimum}"/>
+ to
+ <h:outputText value="#{UserNumberBean.maximum}"/>
+ . Can you guess
+ it?
+ </h2>
+
+ <h:graphicImage id="waveImg" url="/wave.med.gif"/>
+ <h:inputText id="userNo" label="User Number"
+ value="#{UserNumberBean.userNumber}"
+ validator="#{UserNumberBean.validate}"/>
+ <h:commandButton id="submit" action="success" value="Submit"/>
+ <p/>
+ <h:message showSummary="true" showDetail="false"
+ style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique; text-decoration: overline"
+ id="errors1" for="userNo"/>
+
+ </h:form>
+</f:view>
+
+<p>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0!" height="31" width="88"/></a>
+</p>
+</body>
+</html>
+
+</jsp:root>
\ No newline at end of file
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/index.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/index.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/index.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,63 @@
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xml:lang="en" lang="en">
+<jsp:output doctype-root-element="html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Trasitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+<jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/>
+<head>
+</head>
+<body>
+
+<!--
+
+This page allows the user to go to the context-path and get redirected
+to the front page of the app. For example,
+http://localhost:8080/jsf-carstore/. Note that we use "*.jsf" as the
+page mapping. Doing so allows us to just name our pages as "*.jsp",
+refer to them as "*.jsf" and know that they will be properly picked up
+by the container.
+
+-->
+
+<jsp:forward page="guess/greeting.jsp"/>
+</body>
+</html>
+</jsp:root>
\ No newline at end of file
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/response.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/response.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/response.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/response.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,72 @@
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xml:lang="en" lang="en">
+<jsp:output doctype-root-element="html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+<jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/>
+<head>
+ <title>Guess The Number</title>
+</head>
+<body bgcolor="white">
+<f:view>
+ <h:form id="responseForm">
+ <h:graphicImage id="waveImg" url="/wave.med.gif"/>
+ <h2>
+ <h:outputText id="result" lang="en"
+ value="#{UserNumberBean.response}"/>
+ </h2>
+ <h:commandButton id="back" value="Back" action="success"/>
+ <p/>
+
+ </h:form>
+</f:view>
+
+<p>
+ <a href="http://validator.w3.org/check?uri=referer"><img
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0!" height="31" width="88"/></a>
+</p>
+
+</body>
+</html>
+</jsp:root>
\ No newline at end of file
Added: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/wave.med.gif
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/wave.med.gif?rev=948569&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/portlet-bridge/core/trunk/examples/guessNumberMyFacesFilter/src/main/webapp/wave.med.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/pom.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/pom.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/pom.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,272 @@
+<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>
+ <name>MyFaces Portlet Bridge HelloDuke Demo</name>
+ <artifactId>portlet-bridge-helloDuke</artifactId>
+ <packaging>war</packaging>
+
+ <parent>
+ <groupId>org.apache.myfaces.portlet-bridge</groupId>
+ <artifactId>portlet-bridge-examples</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>portlet-api</groupId>
+ <artifactId>portlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>portlet-bridge-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>portlet-bridge-impl</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jdev-plugin</artifactId>
+ <groupId>org.apache.myfaces.trinidadbuild</groupId>
+ <configuration>
+ <libraries>
+ <library>JSP Runtime</library>
+ </libraries>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>pluto-assemble</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <warName>${pom.artifactId}-pluto-${pom.version}</warName>
+ <outputDirectory>${project.build.directory}/../../assembly/target/webapp</outputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- sets up the webapp for deployment to pluto "mvn clean install -Ppluto" -->
+ <profile>
+ <id>pluto</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ <version>1.1.6</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>pluto2</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <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>2.0.0</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
+ <profile>
+ <id>jettyConfig</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.bekk.boss</groupId>
+ <artifactId>maven-jetty-pluto-embedded</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <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>portlet-bridge-helloDuke</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- By default the war examples uses mojarra and packages for a nonjavaee environment (includes the Faces jars)! :) -->
+
+ <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have Mojarra packaged in the war: -->
+ <profile>
+ <id>mojarra-nonjavaee</id>
+ <activation>
+ <property>
+ <name>!jsf</name>
+ </property>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${mojarra.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${mojarra.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <properties>
+ <jsf_implementation>JSF-RI</jsf_implementation>
+ </properties>
+ </profile>
+
+ <!-- If you are running in a JavaEE environment (i.e. Faces is already deployed) and hence don't need to have Mojarra packaged in the war: -->
+ <!-- mvn install -Djsf=mojarra-nonjavaee -->
+ <profile>
+ <id>mojarra</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>mojarra-javaee</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ </dependencies>
+ <properties>
+ <jsf_implementation>JSF-RI</jsf_implementation>
+ </properties>
+ </profile>
+
+
+ <!-- To use this examples using the MyFacesImplementation: mvn clean install -Djsf=myfaces -->
+ <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+ <profile>
+ <id>myfaces-javaee</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>myfaces-javaee</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+
+
+ <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have MyFaces packaged in the war: -->
+ <!-- mvn install -Djsf=myfaces-nonjavaee -->
+ <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+ <profile>
+ <id>myfaces-nonjavaee</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>myfaces-nonjavaee</value>
+ </property>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</project>
+
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/java/helloDuke/UserNameBean.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/java/helloDuke/UserNameBean.java?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/java/helloDuke/UserNameBean.java (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/java/helloDuke/UserNameBean.java Wed May 26 20:20:51 2010
@@ -0,0 +1,49 @@
+/*
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * https://javaserverfaces.dev.java.net/CDDL.html or
+ * legal/CDDLv1.0.txt.
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at legal/CDDLv1.0.txt.
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * [Name of File] [ver.__] [Date]
+ *
+ * Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+ */
+
+package helloDuke;
+
+public class UserNameBean {
+
+ String userName = null;
+
+
+ public UserNameBean() {
+ System.out.println("Model Object Created");
+ }
+
+
+ public void setUserName(String user_name) {
+ userName = user_name;
+ System.out.println("Set userName " + userName);
+ }
+
+
+ public String getUserName() {
+ System.out.println("get userName " + userName);
+ return userName;
+ }
+
+}
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/resources/META-INF/NOTICE?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/resources/META-INF/NOTICE (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/resources/META-INF/NOTICE Wed May 26 20:20:51 2010
@@ -0,0 +1,20 @@
+Apache MyFaces Portlet Bridge
+Copyright [2007, 2008, 2009] The Apache Software Foundation
+
+This is an implementation of a public review specification
+developed under the Java Community Process (JCP). This
+implementation may not fully conform to this specification.
+This implementation may differ from the final specification.
+The code is not compatible with any specification of the JCP.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software are Copyright (c) 2007, Oracle
+Corporation, <http://www.oracle.com/> and are licensed to
+the Apache Software Foundation under the "Software Grant
+and Corporate Contribution License Agreement"
+
+See the LICENSE.txt file for information on all licenses
+associated with this software.
+
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/faces-config.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/faces-config.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ The contents of this file are subject to the terms
+ of the Common Development and Distribution License
+ (the License). You may not use this file except in
+ compliance with the License.
+
+ You can obtain a copy of the License at
+ https://javaserverfaces.dev.java.net/CDDL.html or
+ legal/CDDLv1.0.txt.
+ See the License for the specific language governing
+ permission and limitations under the License.
+
+ When distributing Covered Code, include this CDDL
+ Header Notice in each file and include the License file
+ at legal/CDDLv1.0.txt.
+ If applicable, add the following below the CDDL Header,
+ with the fields enclosed by brackets [] replaced by
+ your own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ [Name of File] [ver.__] [Date]
+
+ Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+-->
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+<faces-config 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-facesconfig_1_2.xsd"
+ version="1.2">
+
+
+ <!-- HelloDuke managed bean -->
+ <managed-bean>
+ <description>The UserNameBean for HelloDuke sample</description>
+ <managed-bean-name>userNameBean</managed-bean-name>
+ <managed-bean-class>helloDuke.UserNameBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <!-- Tell Duke your name -->
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>response</from-outcome>
+ <to-view-id>/helloDuke/response.jsp</to-view-id>
+ </navigation-case>
+
+ <!-- Return to greeting page -->
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/helloDuke/greeting.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
+
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+
+-->
+
+<!-- This web.xml file is used in order to configure pluto to run with jetty in order to test the appropriate web applications -->
+<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">
+
+ <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>
+
+ <!-- Listeners -->
+ <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>
+
+ <!-- Filters and Mappings -->
+ <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>
+ <url-pattern>*.gif</url-pattern>
+ <url-pattern>*.png</url-pattern>
+ <url-pattern>*.js</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>plutoPortalDriver</filter-name>
+ <url-pattern>/pluto/index.jsp</url-pattern>
+ <url-pattern>/pluto/index.jsp/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Servlets and Mappings -->
+
+ <!--
+ 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>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <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>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <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>
+
+ <!-- Other settings -->
+ <session-config>
+ <session-timeout>60</session-timeout>
+ </session-config>
+
+ <welcome-file-list>
+ <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: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/portlet.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/portlet.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/portlet.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+ http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ id="helloDuke" version="2.0">
+ <portlet>
+ <description>helloDuke</description>
+ <portlet-name>portlet-bridge-helloDuke</portlet-name>
+ <display-name>helloDuke</display-name>
+ <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/helloDuke/greeting.jsp</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>helloDuke</title>
+ <short-title>helloDuke</short-title>
+ <keywords>helloDuke</keywords>
+ </portlet-info>
+ </portlet>
+
+</portlet-app>
+
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/web.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/WEB-INF/web.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ The contents of this file are subject to the terms
+ of the Common Development and Distribution License
+ (the License). You may not use this file except in
+ compliance with the License.
+
+ You can obtain a copy of the License at
+ https://javaserverfaces.dev.java.net/CDDL.html or
+ legal/CDDLv1.0.txt.
+ See the License for the specific language governing
+ permission and limitations under the License.
+
+ When distributing Covered Code, include this CDDL
+ Header Notice in each file and include the License file
+ at legal/CDDLv1.0.txt.
+ If applicable, add the following below the CDDL Header,
+ with the fields enclosed by brackets [] replaced by
+ your own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ [Name of File] [ver.__] [Date]
+
+ Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+-->
+
+<web-app version="2.5"
+ 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" >
+
+ <display-name>faces-portlet-bridge-demos</display-name>
+
+ <context-param>
+ <description>
+ The location where state information is saved. Valid values
+ are 'server' (typically saved in HttpSession) and 'client'
+ (typically saved as a hidden field in the form. Default is
+ server.
+ </description>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <description>
+ The default suffix for extension-mapped resources that
+ contain JSF components. Default is '.jsp'.
+ </description>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.jsp</param-value>
+ </context-param>
+
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>-1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.faces</url-pattern>
+ </servlet-mapping>
+
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Added: myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/helloDuke/error.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/helloDuke/error.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/helloDuke/error.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/helloDuke/src/main/webapp/helloDuke/error.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,75 @@
+<%--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+--%>
+
+<!--
+ The contents of this file are subject to the terms
+ of the Common Development and Distribution License
+ (the License). You may not use this file except in
+ compliance with the License.
+
+ You can obtain a copy of the License at
+ https://javaserverfaces.dev.java.net/CDDL.html or
+ legal/CDDLv1.0.txt.
+ See the License for the specific language governing
+ permission and limitations under the License.
+
+ When distributing Covered Code, include this CDDL
+ Header Notice in each file and include the License file
+ at legal/CDDLv1.0.txt.
+ If applicable, add the following below the CDDL Header,
+ with the fields enclosed by brackets [] replaced by
+ your own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ [Name of File] [ver.__] [Date]
+
+ Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+-->
+
+
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<H3>
+ JSF Basic Components Test Page
+</H3>
+<hr>
+<f:view>
+ <h:form id="errorForm">
+ <h:outputText id="helloLabel" text="Login Failed" />
+ <P></P>
+ </h:form>
+</f:view>
+