You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2011/03/18 22:57:38 UTC
svn commit: r1083088 [5/9] - in /myfaces/portlet-bridge/core/trunk_3.0.x: ./
api/ api/src/main/java/javax/portlet/faces/
api/src/main/java/javax/portlet/faces/annotation/
api/src/main/java/javax/portlet/faces/component/
api/src/main/java/javax/portlet/...
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp Fri Mar 18 21:57:31 2011
@@ -1,109 +1,109 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
-/* 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.
--->
-
-<%@ page contentType="text/html"
- isELIgnored="false" %>
-
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
-
-<html>
-<head>
- <title>Pluto Portal</title>
- <style type="text/css" title="currentStyle" media="screen">
- @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";
- @import "<c:out value="${pageContext.request.contextPath}"/>/portlet-spec-1.0.css";
- <c:forEach items="${org_apache_pluto_embedded_extraStyles}" var="style">
- @import "<c:out value="${pageContext.request.contextPath}"/><c:out value="${style}"/>";
- </c:forEach>
- </style>
- <script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">
- </script>
-</head>
-
-<body>
-
-<div id="portal">
-
- <!-- Header block: the Apache Pluto banner image and description -->
- <div id="header">
- <h1>Apache Pluto</h1>
-
- <p>An Apache Portals Project</p>
- </div>
-
- <!-- Logout link -->
- <c:if test="${pageContext.request.remoteUser != null}">
- <div id="logout">
- <a href="<c:url value='/Logout'/>">Logout</a>
- </div>
- </c:if>
-
-
- <!-- Content block: portlets are divided into two columns/groups -->
- <div id="content">
- <pluto:isMaximized var="isMax"/>
-
- <!-- Left column -->
- <c:choose>
- <c:when test="${isMax}">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </c:when>
-
- <c:otherwise>
- <div id="portlets-left-column">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}" step="2">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </div>
-
- <!-- Right column -->
- <div id="portlets-right-column">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}" begin="1" step="2">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </div>
-
- </c:otherwise>
- </c:choose>
-
- </div>
-
-
-
- <!-- Footer block: copyright -->
- <div id="footer">
- © 2003-2005 Apache Software Foundation
- </div>
-
-</div>
-
-</body>
-
-</html>
-
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+/* 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.
+-->
+
+<%@ page contentType="text/html"
+ isELIgnored="false" %>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
+
+<html>
+<head>
+ <title>Pluto Portal</title>
+ <style type="text/css" title="currentStyle" media="screen">
+ @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";
+ @import "<c:out value="${pageContext.request.contextPath}"/>/portlet-spec-1.0.css";
+ <c:forEach items="${org_apache_pluto_embedded_extraStyles}" var="style">
+ @import "<c:out value="${pageContext.request.contextPath}"/><c:out value="${style}"/>";
+ </c:forEach>
+ </style>
+ <script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">
+ </script>
+</head>
+
+<body>
+
+<div id="portal">
+
+ <!-- Header block: the Apache Pluto banner image and description -->
+ <div id="header">
+ <h1>Apache Pluto</h1>
+
+ <p>An Apache Portals Project</p>
+ </div>
+
+ <!-- Logout link -->
+ <c:if test="${pageContext.request.remoteUser != null}">
+ <div id="logout">
+ <a href="<c:url value='/Logout'/>">Logout</a>
+ </div>
+ </c:if>
+
+
+ <!-- Content block: portlets are divided into two columns/groups -->
+ <div id="content">
+ <pluto:isMaximized var="isMax"/>
+
+ <!-- Left column -->
+ <c:choose>
+ <c:when test="${isMax}">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </c:when>
+
+ <c:otherwise>
+ <div id="portlets-left-column">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}" step="2">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </div>
+
+ <!-- Right column -->
+ <div id="portlets-right-column">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}" begin="1" step="2">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </div>
+
+ </c:otherwise>
+ </c:choose>
+
+ </div>
+
+
+
+ <!-- Footer block: copyright -->
+ <div id="footer">
+ © 2003-2005 Apache Software Foundation
+ </div>
+
+</div>
+
+</body>
+
+</html>
+
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/facelets-guess/src/main/webapp/jettypluto/index.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml Fri Mar 18 21:57:31 2011
@@ -1,4 +1,25 @@
-<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">
+<?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.
+-->
+<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 GuessNumber JSP Demo</name>
<artifactId>portlet-bridge-guessNumber-jsp</artifactId>
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java Fri Mar 18 21:57:31 2011
@@ -1,5 +1,5 @@
/*
- * $Id: MessageFactory.java,v 1.6 2005/12/14 22:27:25 rlubke Exp $
+ * $Id$
*/
/*
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/MessageFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/UserNumberBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/java/guessNumber/UserNumberBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml Fri Mar 18 21:57:31 2011
@@ -1,243 +1,243 @@
-<?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>/jettypluto/index.jsp</url-pattern>
- <url-pattern>/jettypluto/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>
-
+<?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>/jettypluto/index.jsp</url-pattern>
+ <url-pattern>/jettypluto/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>
+
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml Fri Mar 18 21:57:31 2011
@@ -1,58 +1,58 @@
-<?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 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="BridgeGuessNumberJSPDemo" version="2.0">
-
-
- <portlet>
- <description>Mojarra Guess Number Portlet</description>
- <portlet-name>portlet-bridge-guessNumber-jsp</portlet-name>
- <display-name>Mojarra Guess Number </display-name>
- <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
-
- <init-param>
- <name>javax.portlet.faces.defaultViewId.view</name>
- <value>/greeting.jspx</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>
+<?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 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="BridgeGuessNumberJSPDemo" version="2.0">
+
+
+ <portlet>
+ <description>Mojarra Guess Number Portlet</description>
+ <portlet-name>portlet-bridge-guessNumber-jsp</portlet-name>
+ <display-name>Mojarra Guess Number </display-name>
+ <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/greeting.jspx</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>
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml Fri Mar 18 21:57:31 2011
@@ -1,82 +1,82 @@
-<?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.
- *
--->
-
-
-<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>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>
-
- <context-param>
- <param-name>javax.portlet.faces.RENDER_POLICY</param-name>
- <param-value>NEVER_DELEGATE</param-value>
- </context-param>
-
-
- <!-- 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>
+<?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.
+ *
+-->
+
+
+<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>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>
+
+ <context-param>
+ <param-name>javax.portlet.faces.RENDER_POLICY</param-name>
+ <param-value>NEVER_DELEGATE</param-value>
+ </context-param>
+
+
+ <!-- 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>
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp Fri Mar 18 21:57:31 2011
@@ -1,109 +1,109 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
-/* 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.
--->
-
-<%@ page contentType="text/html"
- isELIgnored="false" %>
-
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
-
-<html>
-<head>
- <title>Pluto Portal</title>
- <style type="text/css" title="currentStyle" media="screen">
- @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";
- @import "<c:out value="${pageContext.request.contextPath}"/>/portlet-spec-1.0.css";
- <c:forEach items="${org_apache_pluto_embedded_extraStyles}" var="style">
- @import "<c:out value="${pageContext.request.contextPath}"/><c:out value="${style}"/>";
- </c:forEach>
- </style>
- <script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">
- </script>
-</head>
-
-<body>
-
-<div id="portal">
-
- <!-- Header block: the Apache Pluto banner image and description -->
- <div id="header">
- <h1>Apache Pluto</h1>
-
- <p>An Apache Portals Project</p>
- </div>
-
- <!-- Logout link -->
- <c:if test="${pageContext.request.remoteUser != null}">
- <div id="logout">
- <a href="<c:url value='/Logout'/>">Logout</a>
- </div>
- </c:if>
-
-
- <!-- Content block: portlets are divided into two columns/groups -->
- <div id="content">
- <pluto:isMaximized var="isMax"/>
-
- <!-- Left column -->
- <c:choose>
- <c:when test="${isMax}">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </c:when>
-
- <c:otherwise>
- <div id="portlets-left-column">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}" step="2">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </div>
-
- <!-- Right column -->
- <div id="portlets-right-column">
- <c:forEach var="portlet" varStatus="status"
- items="${org_apache_pluto_embedded_portletIds}" begin="1" step="2">
- <c:set var="portlet" value="${portlet}" scope="request"/>
- <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
- </c:forEach>
- </div>
-
- </c:otherwise>
- </c:choose>
-
- </div>
-
-
-
- <!-- Footer block: copyright -->
- <div id="footer">
- © 2003-2005 Apache Software Foundation
- </div>
-
-</div>
-
-</body>
-
-</html>
-
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+/* 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.
+-->
+
+<%@ page contentType="text/html"
+ isELIgnored="false" %>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
+
+<html>
+<head>
+ <title>Pluto Portal</title>
+ <style type="text/css" title="currentStyle" media="screen">
+ @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";
+ @import "<c:out value="${pageContext.request.contextPath}"/>/portlet-spec-1.0.css";
+ <c:forEach items="${org_apache_pluto_embedded_extraStyles}" var="style">
+ @import "<c:out value="${pageContext.request.contextPath}"/><c:out value="${style}"/>";
+ </c:forEach>
+ </style>
+ <script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">
+ </script>
+</head>
+
+<body>
+
+<div id="portal">
+
+ <!-- Header block: the Apache Pluto banner image and description -->
+ <div id="header">
+ <h1>Apache Pluto</h1>
+
+ <p>An Apache Portals Project</p>
+ </div>
+
+ <!-- Logout link -->
+ <c:if test="${pageContext.request.remoteUser != null}">
+ <div id="logout">
+ <a href="<c:url value='/Logout'/>">Logout</a>
+ </div>
+ </c:if>
+
+
+ <!-- Content block: portlets are divided into two columns/groups -->
+ <div id="content">
+ <pluto:isMaximized var="isMax"/>
+
+ <!-- Left column -->
+ <c:choose>
+ <c:when test="${isMax}">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </c:when>
+
+ <c:otherwise>
+ <div id="portlets-left-column">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}" step="2">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </div>
+
+ <!-- Right column -->
+ <div id="portlets-right-column">
+ <c:forEach var="portlet" varStatus="status"
+ items="${org_apache_pluto_embedded_portletIds}" begin="1" step="2">
+ <c:set var="portlet" value="${portlet}" scope="request"/>
+ <jsp:include page="/WEB-INF/themes/portlet-skin.jsp"/>
+ </c:forEach>
+ </div>
+
+ </c:otherwise>
+ </c:choose>
+
+ </div>
+
+
+
+ <!-- Footer block: copyright -->
+ <div id="footer">
+ © 2003-2005 Apache Software Foundation
+ </div>
+
+</div>
+
+</body>
+
+</html>
+
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumber/src/main/webapp/jettypluto/index.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml Fri Mar 18 21:57:31 2011
@@ -1,4 +1,25 @@
-<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">
+<?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.
+-->
+<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 GuessNumber JSP with Mojarra WriteBehind Filter Demo</name>
<artifactId>portlet-bridge-guessNumber-jsp-mojarraFilter</artifactId>
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/guessNumber/MessageFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/guessNumber/MessageFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/guessNumber/UserNumberBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/guessNumber/UserNumberBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java?rev=1083088&r1=1083087&r2=1083088&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java (original)
+++ myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java Fri Mar 18 21:57:31 2011
@@ -1,454 +1,454 @@
-/* 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.
- **/
-
-package org.apache.myfaces.portlet.faces.application;
-
-import com.sun.faces.application.ViewHandlerResponseWrapper;
-
-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.faces.context.ExternalContext;
-
-import javax.faces.context.FacesContext;
-
-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 BridgeMojarraRenderFilter
- implements Filter
-{
- public BridgeMojarraRenderFilter()
- {
- }
-
- 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);
-
- // temporarily set as the response object in the ExternalContext -- as the Mojarra ViewTag
- // gets this instance to verify it can write after.
- ExternalContext extCtx = FacesContext.getCurrentInstance().getExternalContext();
- Object currentResponse = extCtx.getResponse();
- extCtx.setResponse(wrapped);
-
- chain.doFilter(request, wrapped);
-
- // reset the ExternalContext response
- extCtx.setResponse(currentResponse);
-
- // 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 ViewHandlerResponseWrapper
- {
-
- 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
-}
+/* 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.
+ **/
+
+package org.apache.myfaces.portlet.faces.application;
+
+import com.sun.faces.application.ViewHandlerResponseWrapper;
+
+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.faces.context.ExternalContext;
+
+import javax.faces.context.FacesContext;
+
+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 BridgeMojarraRenderFilter
+ implements Filter
+{
+ public BridgeMojarraRenderFilter()
+ {
+ }
+
+ 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);
+
+ // temporarily set as the response object in the ExternalContext -- as the Mojarra ViewTag
+ // gets this instance to verify it can write after.
+ ExternalContext extCtx = FacesContext.getCurrentInstance().getExternalContext();
+ Object currentResponse = extCtx.getResponse();
+ extCtx.setResponse(wrapped);
+
+ chain.doFilter(request, wrapped);
+
+ // reset the ExternalContext response
+ extCtx.setResponse(currentResponse);
+
+ // 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 ViewHandlerResponseWrapper
+ {
+
+ 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
+}
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/java/org/apache/myfaces/portlet/faces/application/BridgeMojarraRenderFilter.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/portlet-bridge/core/trunk_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL