You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/08/19 14:31:52 UTC
svn commit: r567391 - in /myfaces/orchestra/trunk:
core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/
core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/
core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapt...
Author: imario
Date: Sun Aug 19 05:31:51 2007
New Revision: 567391
URL: http://svn.apache.org/viewvc?view=rev&rev=567391
Log:
refactored ViewControllerExecutor to have an interface for the abstract basis class
added a CompositeViewControllerExecutor
added a PlainAnnotationsViewControllerManager which does not fallback to the default naming scheme and reflective event method execution in case you work in a plain jdk 1.5 environment
moved initialization of the RequestParameterProvider to a FacesContextFactory for JSF environments
added a FrameworkAdapterServletFilter for the case where you have to deal with mixed JSP+JSF environments
updated documentation
Added:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java (contents, props changed)
- copied, changed from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java (contents, props changed)
- copied, changed from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/JsfFrameworkAdapter.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerExecutor.java
- copied, changed from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerNameMapper.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ViewControllerExecutor.java
- copied, changed from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractAnnotationsViewControllerManager.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/PlainAnnotationsViewControllerManager.java
- copied, changed from r567385, myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java
Removed:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/JsfFrameworkAdapter.java
Modified:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterProviderManager.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterResponseWrapper.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/jsf/RequestParameterFacesContextFactory.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerManager.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/DefaultViewControllerManager.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/InterfaceViewControllerExecutor.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ReflectiveViewControllerExecutor.java
myfaces/orchestra/trunk/core/src/main/resources/META-INF/faces-config.xml
myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerExecutor.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java
myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml
myfaces/orchestra/trunk/examples/src/main/webapp/annotations/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/ballot/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/multiBean/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java Sun Aug 19 05:31:51 2007
@@ -19,23 +19,18 @@
package org.apache.myfaces.orchestra.conversation.jsf.filter;
-import java.io.IOException;
+import org.apache.myfaces.orchestra.connectionManager.ConnectionManagerDataSource;
+import org.apache.myfaces.orchestra.conversation.ConversationContext;
+import org.apache.myfaces.orchestra.conversation.ConversationManager;
+import org.apache.myfaces.orchestra.frameworkAdapter.jsf.FrameworkAdapterServletFilter;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.myfaces.orchestra.connectionManager.ConnectionManagerDataSource;
-import org.apache.myfaces.orchestra.conversation.ConversationContext;
-import org.apache.myfaces.orchestra.conversation.ConversationManager;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapterInterface;
+import java.io.IOException;
/**
* Perform a number of useful per-request tasks.
@@ -102,7 +97,7 @@
public final static String FRAMEWORK_ADAPTER_KEY = "org.apache.myfaces.orchestra.FRAMEWORK_ADAPTER_CLASS"; // NON-NLS
/** The default value for FRAMEWORK_ADAPTER_KEY. */
- public final static String FRAMEWORK_ADAPTER_DFLT = "org.apache.myfaces.orchestra.frameworkAdapter.JsfFrameworkAdapter"; // NON-NLS
+ public final static String FRAMEWORK_ADAPTER_DFLT = "org.apache.myfaces.orchestra.frameworkAdapter.jsf.JsfFrameworkAdapter"; // NON-NLS
/**
* Key of an attribute within the ConversationContext that is used as a lock to serialize
@@ -110,11 +105,9 @@
*/
private final static String CONTEXT_MUTEXT_OBJECT = OrchestraServletFilter.class.getName() + ".SER_MUTEX";
- private static ThreadLocal httpServletRequest = new ThreadLocal();
- private static ThreadLocal httpServletResponse = new ThreadLocal();
-
private boolean serializeRequests = true;
- private FrameworkAdapterInterface frameworkAdapterObj;
+
+ private final FrameworkAdapterServletFilter frameworkAdapterServletFilter = new FrameworkAdapterServletFilter();
public void init(FilterConfig filterConfig) throws ServletException
{
@@ -123,84 +116,57 @@
{
serializeRequests = false;
}
-
- ServletContext servletContext = filterConfig.getServletContext();
- String adapterClassName = servletContext.getInitParameter(FRAMEWORK_ADAPTER_KEY);
- if (adapterClassName == null) {
- adapterClassName = FRAMEWORK_ADAPTER_DFLT;
- }
- try {
- Class adapterClass = this.getClass().getClassLoader().loadClass(adapterClassName);
- frameworkAdapterObj = (FrameworkAdapterInterface) adapterClass.newInstance();
- } catch(ClassNotFoundException e) {
- throw new ServletException("Unable to load Orchestra FrameworkAdapter class " + adapterClassName, e);
- } catch(InstantiationException e) {
- throw new ServletException("Unable to load Orchestra FrameworkAdapter class " + adapterClassName, e);
- } catch(IllegalAccessException e) {
- throw new ServletException("Unable to load Orchestra FrameworkAdapter class " + adapterClassName, e);
- }
+
+ frameworkAdapterServletFilter.init(filterConfig);
}
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException
{
- try
+ frameworkAdapterServletFilter.doFilter(servletRequest, servletResponse, new FilterChain()
{
- if (servletRequest instanceof HttpServletRequest)
- {
- httpServletRequest.set(servletRequest);
- }
- if (servletResponse instanceof HttpServletResponse)
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException
{
- httpServletResponse.set(servletResponse);
- }
-
- FrameworkAdapter.setInstance(frameworkAdapterObj);
- Object mutex = null;
- if (serializeRequests)
- {
- ConversationManager manager = ConversationManager.getInstance(false);
- if (manager != null)
+ try
{
- ConversationContext conversationContext = manager.getCurrentConversationContext();
- if (conversationContext != null)
+ Object mutex = null;
+ if (serializeRequests)
{
- synchronized(conversationContext)
+ ConversationManager manager = ConversationManager.getInstance(false);
+ if (manager != null)
{
- mutex = conversationContext.getAttribute(CONTEXT_MUTEXT_OBJECT);
- if (mutex == null)
+ ConversationContext conversationContext = manager.getCurrentConversationContext();
+ if (conversationContext != null)
{
- mutex = new Object();
- conversationContext.setAttribute(CONTEXT_MUTEXT_OBJECT, mutex);
+ synchronized(conversationContext)
+ {
+ mutex = conversationContext.getAttribute(CONTEXT_MUTEXT_OBJECT);
+ if (mutex == null)
+ {
+ mutex = new Object();
+ conversationContext.setAttribute(CONTEXT_MUTEXT_OBJECT, mutex);
+ }
+ }
}
}
}
+ if (serializeRequests && mutex != null)
+ {
+ synchronized(mutex)
+ {
+ filterChain.doFilter(servletRequest, servletResponse);
+ }
+ }
+ else
+ {
+ filterChain.doFilter(servletRequest, servletResponse);
+ }
}
- }
- if (serializeRequests && mutex != null)
- {
- synchronized(mutex)
+ finally
{
- filterChain.doFilter(servletRequest, servletResponse);
+ cleanupPersistence();
}
}
- else
- {
- filterChain.doFilter(servletRequest, servletResponse);
- }
- }
- finally
- {
- try
- {
- cleanupPersistence();
- }
- finally
- {
- FrameworkAdapter.setInstance(null);
- httpServletRequest.set(null);
- httpServletResponse.set(null);
- }
- }
+ });
}
protected void cleanupPersistence()
@@ -208,17 +174,8 @@
ConnectionManagerDataSource.releaseAllBorrowedConnections();
}
- public static HttpServletRequest getHttpServletRequest()
- {
- return (HttpServletRequest) httpServletRequest.get();
- }
-
- public static HttpServletResponse getHttpServletResponse()
- {
- return (HttpServletResponse) httpServletResponse.get();
- }
-
public void destroy()
{
+ frameworkAdapterServletFilter.destroy();
}
}
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java (from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java?view=diff&rev=567391&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java&r1=567381&p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java Sun Aug 19 05:31:51 2007
@@ -17,9 +17,11 @@
* under the License.
*/
-package org.apache.myfaces.orchestra.conversation.jsf.filter;
+package org.apache.myfaces.orchestra.frameworkAdapter.jsf;
-import java.io.IOException;
+import org.apache.myfaces.orchestra.connectionManager.ConnectionManagerDataSource;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapterInterface;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -30,12 +32,7 @@
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-import org.apache.myfaces.orchestra.connectionManager.ConnectionManagerDataSource;
-import org.apache.myfaces.orchestra.conversation.ConversationContext;
-import org.apache.myfaces.orchestra.conversation.ConversationManager;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapterInterface;
+import java.io.IOException;
/**
* Perform a number of useful per-request tasks.
@@ -52,78 +49,27 @@
* variables for the duration of this request. This makes it possible for any code to
* retrieve them via static methods on this class. This is required by at least
* the JsfFrameworkAdapter class, ie required when using Orchestra with JSF.
- * <p>
- * <h2>Request Synchronization</h2>
- * It is possible for multiple requests associated with the same http session to be
- * received concurrently. In particular, ajax pages can cause this.
- * <p>
- * By default, the servlet engine simply processes all requests concurrently
- * in different threads. However that can cause all sorts of unexpected problems with
- * session-scoped objects.
- * <p>
- * The usual solution is to apply a filter to all requests which uses standard java
- * synchronisation on a session-scoped object, taking the lock on request entry and
- * releasing it on request exit. This ensures that only one request for that session
- * runs at a time, with the others waiting until they can obtain a lock on the
- * appropriate object.
- * <p>
- * When using an Orchestra conversationContext, session-scoped data should be avoided and
- * conversation-scoped beans used instead. If there is no session-scoped data in use by
- * an application then it is possible to allow concurrent requests to the same http session,
- * but NOT concurrent access to the same orchestra conversationContext. This filter
- * implements that, by holding a lock on a mutex object held by the appropriate
- * conversationContext.
- * <p>
- * The serialize-requests functionality can be enabled or disabled via a filter init
- * parameter; setting "serializeRequests" to "false" disables this filter. Default
- * value: true (enabled).
- * <p>
- * <h2>JDBC Connection Management</h2>
- * Orchestra provides a special DataSource wrapper that can be configured for any
- * datasource used by the application. The datasource simply wraps all real Connection
- * objects it returns in a proxy, and keeps track of them. Here in this servlet it
- * checks whether all connections borrowed by this thread have been returned, and if
- * not returns the real connection nulls out the connection held by the proxy. See
- * ConnectionManagerDataSource for more details.
*/
-public class OrchestraServletFilter implements Filter
+public class FrameworkAdapterServletFilter implements Filter
{
/**
- * This filter init property can be set to "true" or "false". Default: "true".
- */
- public final static String SERIALIZE_REQUESTS = "serializeRequests"; // NON-NLS
-
- /**
* A <i>servlet context</i> property that defines the name of a java class which maps from
- * the orchestra FrameworkAdapterInterface to the actual web tier environment
+ * the orchestra FrameworkAdapterInterface to the actual web tier environment
* that orchestra is running in. Defaults to the standard orchestra JSF adapter.
* This only needs to be set if Orchestra is being used in a non-JSF environment.
*/
public final static String FRAMEWORK_ADAPTER_KEY = "org.apache.myfaces.orchestra.FRAMEWORK_ADAPTER_CLASS"; // NON-NLS
/** The default value for FRAMEWORK_ADAPTER_KEY. */
- public final static String FRAMEWORK_ADAPTER_DFLT = "org.apache.myfaces.orchestra.frameworkAdapter.JsfFrameworkAdapter"; // NON-NLS
-
- /**
- * Key of an attribute within the ConversationContext that is used as a lock to serialize
- * multiple http requests for the same conversation context.
- */
- private final static String CONTEXT_MUTEXT_OBJECT = OrchestraServletFilter.class.getName() + ".SER_MUTEX";
+ public final static String FRAMEWORK_ADAPTER_DFLT = JsfFrameworkAdapter.class.getName();
private static ThreadLocal httpServletRequest = new ThreadLocal();
private static ThreadLocal httpServletResponse = new ThreadLocal();
- private boolean serializeRequests = true;
private FrameworkAdapterInterface frameworkAdapterObj;
public void init(FilterConfig filterConfig) throws ServletException
{
- String value = filterConfig.getInitParameter(SERIALIZE_REQUESTS);
- if ("false".equals(value)) // NON-NLS
- {
- serializeRequests = false;
- }
-
ServletContext servletContext = filterConfig.getServletContext();
String adapterClassName = servletContext.getInitParameter(FRAMEWORK_ADAPTER_KEY);
if (adapterClassName == null) {
@@ -155,51 +101,13 @@
}
FrameworkAdapter.setInstance(frameworkAdapterObj);
- Object mutex = null;
- if (serializeRequests)
- {
- ConversationManager manager = ConversationManager.getInstance(false);
- if (manager != null)
- {
- ConversationContext conversationContext = manager.getCurrentConversationContext();
- if (conversationContext != null)
- {
- synchronized(conversationContext)
- {
- mutex = conversationContext.getAttribute(CONTEXT_MUTEXT_OBJECT);
- if (mutex == null)
- {
- mutex = new Object();
- conversationContext.setAttribute(CONTEXT_MUTEXT_OBJECT, mutex);
- }
- }
- }
- }
- }
- if (serializeRequests && mutex != null)
- {
- synchronized(mutex)
- {
- filterChain.doFilter(servletRequest, servletResponse);
- }
- }
- else
- {
- filterChain.doFilter(servletRequest, servletResponse);
- }
+ filterChain.doFilter(servletRequest, servletResponse);
}
finally
{
- try
- {
- cleanupPersistence();
- }
- finally
- {
- FrameworkAdapter.setInstance(null);
- httpServletRequest.set(null);
- httpServletResponse.set(null);
- }
+ FrameworkAdapter.setInstance(null);
+ httpServletRequest.set(null);
+ httpServletResponse.set(null);
}
}
@@ -208,12 +116,12 @@
ConnectionManagerDataSource.releaseAllBorrowedConnections();
}
- public static HttpServletRequest getHttpServletRequest()
+ static HttpServletRequest getHttpServletRequest()
{
return (HttpServletRequest) httpServletRequest.get();
}
- public static HttpServletResponse getHttpServletResponse()
+ static HttpServletResponse getHttpServletResponse()
{
return (HttpServletResponse) httpServletResponse.get();
}
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/FrameworkAdapterServletFilter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java (from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/JsfFrameworkAdapter.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java?view=diff&rev=567391&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/JsfFrameworkAdapter.java&r1=567381&p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/JsfFrameworkAdapter.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java Sun Aug 19 05:31:51 2007
@@ -1,8 +1,4 @@
/*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
* 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
@@ -20,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.myfaces.orchestra.frameworkAdapter;
+package org.apache.myfaces.orchestra.frameworkAdapter.jsf;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
-import org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapterInterface;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
@@ -61,7 +57,7 @@
return context.getExternalContext().getRequestParameterMap().get(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
return request.getParameter(key);
@@ -78,7 +74,7 @@
return context.getExternalContext().getRequestParameterMap().containsKey(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
return request.getParameter(key) != null;
@@ -95,7 +91,7 @@
return context.getExternalContext().getRequestMap().get(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
return request.getAttribute(key);
@@ -113,7 +109,7 @@
return;
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
request.setAttribute(key, value);
@@ -131,7 +127,7 @@
return context.getExternalContext().getRequestMap().containsKey(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
return request.getAttribute(key) != null;
@@ -148,7 +144,7 @@
return context.getExternalContext().getSessionMap().get(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null && request.getSession(true) != null)
{
return request.getSession(true).getAttribute(key);
@@ -166,7 +162,7 @@
return;
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null && request.getSession(true) != null)
{
request.getSession(true).setAttribute(key, value);
@@ -183,7 +179,7 @@
return context.getExternalContext().getSessionMap().containsKey(key);
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null && request.getSession(true) != null)
{
return request.getSession(true).getAttribute(key) != null;
@@ -200,7 +196,7 @@
return context.getExternalContext().getRequestContextPath();
}
- HttpServletRequest request = OrchestraServletFilter.getHttpServletRequest();
+ HttpServletRequest request = FrameworkAdapterServletFilter.getHttpServletRequest();
if (request != null)
{
return request.getContextPath();
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterProviderManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterProviderManager.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterProviderManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterProviderManager.java Sun Aug 19 05:31:51 2007
@@ -19,14 +19,14 @@
package org.apache.myfaces.orchestra.requestParameterProvider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
/**
* The manager which manage all the attached providers and add their fields to the url.
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterResponseWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterResponseWrapper.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterResponseWrapper.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/RequestParameterResponseWrapper.java Sun Aug 19 05:31:51 2007
@@ -57,7 +57,6 @@
return this.original.encodeURL(url);
}
-
/**
* @param url the url to encode
* @return wrappedResponse.encodeUrl(url);
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/jsf/RequestParameterFacesContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/jsf/RequestParameterFacesContextFactory.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/jsf/RequestParameterFacesContextFactory.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/requestParameterProvider/jsf/RequestParameterFacesContextFactory.java Sun Aug 19 05:31:51 2007
@@ -21,12 +21,12 @@
import org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterResponseWrapper;
import org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter;
-import javax.faces.context.FacesContextFactory;
+import javax.faces.FacesException;
import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
import javax.faces.lifecycle.Lifecycle;
-import javax.faces.FacesException;
-import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
/**
* <p/>
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -23,20 +23,25 @@
/**
* <p>The abstract basis class you have to use as basis class for any custom view controller executor.</p>
- * <p>Notice: This interface can be extended between releases, thats why its an abstract class instead of an interface.
- * New methods not implemented by your custom excecutor will not harm your system that way.</p>
+ * <p>Notice: This abstract class is a helper as the interface can be extended between releases,
+ * thats why its an abstract class instead of an interface.
+ * New methods not implemented by your custom excecutor will not harm your system that way
+ * if you inherit from this abstract class .</p>
*/
-public abstract class AbstractViewControllerExecutor
+public abstract class AbstractViewControllerExecutor implements ViewControllerExecutor
{
- public void invokeInitView(String beanName, Object bean)
+ public boolean invokeInitView(String beanName, Object bean)
{
+ return false;
}
- public void invokePreRenderView(String beanName, Object bean)
+ public boolean invokePreRenderView(String beanName, Object bean)
{
+ return false;
}
- public void invokePreProcess(String beanName, Object bean)
+ public boolean invokePreProcess(String beanName, Object bean)
{
+ return false;
}
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerManager.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerManager.java Sun Aug 19 05:31:51 2007
@@ -28,7 +28,7 @@
public abstract class AbstractViewControllerManager implements ViewControllerManager
{
protected abstract ViewControllerNameMapper getViewControllerNameMapper();
- protected abstract AbstractViewControllerExecutor getViewControllerExecutor();
+ protected abstract ViewControllerExecutor getViewControllerExecutor();
public Object getViewController(String viewId)
{
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerExecutor.java (from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerNameMapper.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerExecutor.java?view=diff&rev=567391&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerNameMapper.java&r1=567381&p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerExecutor.java&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerNameMapper.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/CompositeViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -20,30 +20,56 @@
package org.apache.myfaces.orchestra.viewController;
/**
- * Each view controller configured with the constructor will be asked to map the given viewId.
- * The first one not returning NULL wins.
+ * Each executor configured with the constructor will be asked to execute the
+ * requested method on the bean. The search will end if the executor returns "true".
*/
-public class CompositeViewControllerNameMapper implements ViewControllerNameMapper
+public class CompositeViewControllerExecutor implements ViewControllerExecutor
{
- private final ViewControllerNameMapper[] viewControllerNameMappers;
+ private final ViewControllerExecutor[] viewControllerExecutors;
- public CompositeViewControllerNameMapper(ViewControllerNameMapper[] viewControllerNameMappers)
+ public CompositeViewControllerExecutor(ViewControllerExecutor[] viewControllerExecutors)
{
- this.viewControllerNameMappers = new ViewControllerNameMapper[viewControllerNameMappers.length];
- System.arraycopy(viewControllerNameMappers, 0, this.viewControllerNameMappers, 0, viewControllerNameMappers.length);
+ this.viewControllerExecutors = new ViewControllerExecutor[viewControllerExecutors.length];
+ System.arraycopy(viewControllerExecutors, 0, this.viewControllerExecutors, 0, viewControllerExecutors.length);
}
- public String mapViewId(String viewId)
+
+ public boolean invokeInitView(String beanName, Object bean)
+ {
+ for (int i = 0; i< viewControllerExecutors.length; i++)
+ {
+ if (viewControllerExecutors[i].invokeInitView(beanName, bean))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean invokePreRenderView(String beanName, Object bean)
+ {
+ for (int i = 0; i< viewControllerExecutors.length; i++)
+ {
+ if (viewControllerExecutors[i].invokePreRenderView(beanName, bean))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean invokePreProcess(String beanName, Object bean)
{
- for (int i = 0; i<viewControllerNameMappers.length; i++)
+ for (int i = 0; i< viewControllerExecutors.length; i++)
{
- String beanName = viewControllerNameMappers[i].mapViewId(viewId);
- if (beanName != null)
+ if (viewControllerExecutors[i].invokePreProcess(beanName, bean))
{
- return beanName;
+ return true;
}
}
- return null;
+ return false;
}
-}
+}
\ No newline at end of file
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/DefaultViewControllerManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/DefaultViewControllerManager.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/DefaultViewControllerManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/DefaultViewControllerManager.java Sun Aug 19 05:31:51 2007
@@ -32,7 +32,7 @@
public class DefaultViewControllerManager extends AbstractViewControllerManager
{
private ViewControllerNameMapper viewControllerNameMapper = new DefaultViewControllerNameMapper();
- private AbstractViewControllerExecutor abstractViewControllerExecutor = new ReflectiveViewControllerExecutor();
+ private ViewControllerExecutor viewControllerExecutor = new ReflectiveViewControllerExecutor();
public DefaultViewControllerManager()
{
@@ -43,8 +43,8 @@
return viewControllerNameMapper;
}
- protected AbstractViewControllerExecutor getViewControllerExecutor()
+ protected ViewControllerExecutor getViewControllerExecutor()
{
- return abstractViewControllerExecutor;
+ return viewControllerExecutor;
}
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/InterfaceViewControllerExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/InterfaceViewControllerExecutor.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/InterfaceViewControllerExecutor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/InterfaceViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -29,29 +29,33 @@
*/
public class InterfaceViewControllerExecutor extends AbstractViewControllerExecutor
{
- public void invokeInitView(String beanName, Object bean)
+ public boolean invokeInitView(String beanName, Object bean)
{
if (bean instanceof ViewController)
{
((ViewController) bean).initView();
+ return true;
}
+ return false;
}
- public void invokePreRenderView(String beanName, Object bean)
+ public boolean invokePreRenderView(String beanName, Object bean)
{
if (bean instanceof ViewController)
{
((ViewController) bean).preRenderView();
+ return true;
}
+ return false;
}
- public void invokePreProcess(String beanName, Object bean)
+ public boolean invokePreProcess(String beanName, Object bean)
{
if (bean instanceof ViewController)
{
((ViewController) bean).preProcess();
- }
- }
-
-
+ return true;
+ }
+ return false;
+ }
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ReflectiveViewControllerExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ReflectiveViewControllerExecutor.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ReflectiveViewControllerExecutor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ReflectiveViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -44,7 +44,7 @@
/**
* Helper method to find the method which should get invoked.
*/
- protected void invokeOnViewController(Object bean, String methodName)
+ protected boolean invokeOnViewController(Object bean, String methodName)
{
try
{
@@ -53,8 +53,7 @@
}
catch (NoSuchMethodException e)
{
- // no problem
- // just ignore it
+ return false;
}
catch (IllegalAccessException e)
{
@@ -64,21 +63,23 @@
{
throw new OrchestraException(e);
}
+
+ return true;
}
/* the ViewControllerExecutor interface */
- public void invokeInitView(String beanName, Object bean)
+ public boolean invokeInitView(String beanName, Object bean)
{
- invokeOnViewController(bean, "initView");
+ return invokeOnViewController(bean, "initView");
}
- public void invokePreRenderView(String beanName, Object bean)
+ public boolean invokePreRenderView(String beanName, Object bean)
{
- invokeOnViewController(bean, "preRenderView");
+ return invokeOnViewController(bean, "preRenderView");
}
- public void invokePreProcess(String beanName, Object bean)
+ public boolean invokePreProcess(String beanName, Object bean)
{
- invokeOnViewController(bean, "preProcess");
+ return invokeOnViewController(bean, "preProcess");
}
}
Copied: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ViewControllerExecutor.java (from r567381, myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ViewControllerExecutor.java?view=diff&rev=567391&p1=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java&r1=567381&p2=myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ViewControllerExecutor.java&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractViewControllerExecutor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/viewController/ViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -22,21 +22,14 @@
/**
- * <p>The abstract basis class you have to use as basis class for any custom view controller executor.</p>
- * <p>Notice: This interface can be extended between releases, thats why its an abstract class instead of an interface.
- * New methods not implemented by your custom excecutor will not harm your system that way.</p>
+ * <p>The interface you have to use as basis class for any custom view controller executor.</p>
+ * <p>Notice: Do not implement this interface directly, instead use the {@link AbstractViewControllerExecutor}</p>
*/
-public abstract class AbstractViewControllerExecutor
+public interface ViewControllerExecutor
{
- public void invokeInitView(String beanName, Object bean)
- {
- }
+ public boolean invokeInitView(String beanName, Object bean);
- public void invokePreRenderView(String beanName, Object bean)
- {
- }
-
- public void invokePreProcess(String beanName, Object bean)
- {
- }
-}
+ public boolean invokePreRenderView(String beanName, Object bean);
+
+ public boolean invokePreProcess(String beanName, Object bean);
+}
\ No newline at end of file
Modified: myfaces/orchestra/trunk/core/src/main/resources/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/resources/META-INF/faces-config.xml?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/resources/META-INF/faces-config.xml (original)
+++ myfaces/orchestra/trunk/core/src/main/resources/META-INF/faces-config.xml Sun Aug 19 05:31:51 2007
@@ -39,4 +39,8 @@
<phase-listener>org.apache.myfaces.orchestra.viewController.jsf.ViewControllerPhaseListener</phase-listener>
</lifecycle>
+ <factory>
+ <faces-context-factory>org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory</faces-context-factory>
+ </factory>
+
</faces-config>
Modified: myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml Sun Aug 19 05:31:51 2007
@@ -210,8 +210,6 @@
<li>the Spring listeners</li>
<li>the Apache MyFaces Orchestra Filter</li>
-
- <li>the Apache MyFaces Orchestra RequestParameterServletFilter</li>
</ul>
<p>In the end, the configuration will look like this:</p>
<pre>
@@ -229,20 +227,11 @@
<filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
</filter>
-<filter>
- <filter-name>requestParameterFilter</filter-name>
- <filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
-</filter>
-
<filter-mapping>
<filter-name>orchestraFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
-<filter-mapping>
- <filter-name>requestParameterFilter</filter-name>
- <url-pattern>*.faces</url-pattern>
-</filter-mapping>
</pre>
<p>
<b>Notice:</b> Replace the <code>*.faces</code> url-pattern by the one used by your application.
@@ -251,12 +240,46 @@
The OrchestraFilter ensures that any resources in use by the underlying framework
(for example those of the ORM mapper in use) will be freed.
</p>
- <p>The RequestParameterServletFilter is
- responsible to ensure the addition of a conversation related parameter to
- the url. It does this by wrapping the ServletResponse and overriding the
- encodeURL methods.
+ </subsection>
+
+ <subsection name="Mixed environment installation">
+ <p>
+ The RequestParameterProvider is a framework which allows one to add
+ parameter to the URL string.<br />
+ In an JSF environment care has been taken that this framework has been
+ setup without further configuration.
+ </p>
+ <p>
+ Though, if you have to deal with mixed environments e.g. JSP+JSF you have
+ to ensure the RequestParameterServletFilter will be called for the JSP pages
+ too.
+ </p>
+ <p>
+ To ensure this, you have to configure two additional filters like this:
</p>
+<pre>
+ <filter>
+ <filter-name>frameworkAdapterFilter</filter-name>
+ <filter-class>org.apache.myfaces.orchestra.frameworkAdapter.jsf.FrameworkAdapterServletFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>requestParameterFilter</filter-name>
+ <filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>frameworkAdapterFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>requestParameterFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
+ </filter-mapping>
+</pre>
</subsection>
+
<subsection name="Conclusion">That's all
for the basic configuration of Apache MyFaces Orchestra, now you should have
a working conversation scope. In fact there is nothing special in creating
Added: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractAnnotationsViewControllerManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractAnnotationsViewControllerManager.java?view=auto&rev=567391
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractAnnotationsViewControllerManager.java (added)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AbstractAnnotationsViewControllerManager.java Sun Aug 19 05:31:51 2007
@@ -0,0 +1,129 @@
+/*
+ * 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.orchestra.viewController;
+
+import org.apache.myfaces.orchestra.annotation.AnnotationInfoManager;
+import org.apache.myfaces.orchestra.annotation.AnnotationInfo;
+import org.apache.myfaces.orchestra.conversation.annotations.ConversationRequire;
+import org.apache.myfaces.orchestra.conversation.ConversationManager;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
+import org.apache.myfaces.orchestra.lib.OrchestraException;
+import org.apache.commons.lang.StringUtils;
+
+import java.io.IOException;
+
+/**
+ * A {@link org.apache.myfaces.orchestra.viewController.ViewControllerManager} implementation which uses
+ * annotations on backing beans to determine the beans responsible for a given view and execute
+ * the appropriate annotated methods.
+ *
+ * <p>When using Spring, every bean declaration in the spring config files is checked to see if the
+ * referenced class has annotations, and if so that information is cached. Here, that information is
+ * then used to locate a bean which has a ViewController annotation that references the current view.</p>
+ *
+ * <p>See also org.apache.myfaces.orchestra.viewController.annotations.*.</p>
+ *
+ * @see org.apache.myfaces.orchestra.viewController.ViewControllerManager
+ */
+public abstract class AbstractAnnotationsViewControllerManager extends AbstractViewControllerManager
+{
+ private AnnotationInfoManager annotationInfoManager;
+
+ public AbstractAnnotationsViewControllerManager()
+ {
+ }
+
+ public abstract void initManager();
+
+ public void setAnnotationInfoManager(AnnotationInfoManager annotationInfoManager)
+ {
+ this.annotationInfoManager = annotationInfoManager;
+ }
+
+ public AnnotationInfoManager getAnnotationInfoManager()
+ {
+ return annotationInfoManager;
+ }
+
+ public void assertConversationState(String viewId)
+ {
+ String beanName = getViewControllerNameMapper().mapViewId(viewId);
+ if (beanName == null)
+ {
+ return;
+ }
+
+ AnnotationInfo annotationInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
+ if (annotationInfo == null || annotationInfo.getConversationRequire() == null)
+ {
+ return;
+ }
+
+ ConversationRequire conversationRequire = annotationInfo.getConversationRequire();
+
+ // check if we are on an entry-point-page
+ String[] entryPoints = conversationRequire.entryPointViewIds();
+ if (entryPoints != null && entryPoints.length > 0)
+ {
+ for (int i = 0; i < entryPoints.length; i++)
+ {
+ String entryPoint = entryPoints[i];
+ if (entryPoint.equals(viewId))
+ {
+ // yes ... no need to check
+ return;
+ }
+ }
+ }
+
+ String[] conversationNames = conversationRequire.conversationNames();
+ if (conversationNames == null || conversationNames.length < 1)
+ {
+ // wrong configuration?
+ return;
+ }
+
+ ConversationManager manager = ConversationManager.getInstance();
+ for (int i = 0; i < conversationNames.length; i++)
+ {
+ String conversationName = conversationNames[i];
+
+ if (!manager.hasConversation(conversationName))
+ {
+ if (!StringUtils.isEmpty(conversationRequire.redirect()))
+ {
+ try
+ {
+ FrameworkAdapter.getInstance().redirect(conversationRequire.redirect());
+ }
+ catch (IOException e)
+ {
+ throw new OrchestraException(e);
+ }
+ }
+ else if (!StringUtils.isEmpty(conversationRequire.navigationAction()))
+ {
+ FrameworkAdapter.getInstance().invokeNavigation(conversationRequire.navigationAction());
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerExecutor.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerExecutor.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerExecutor.java Sun Aug 19 05:31:51 2007
@@ -41,24 +41,21 @@
protected void invokeMethod(Object bean, Method method)
{
- if (method != null)
+ try
{
- try
- {
- method.invoke(bean, (Object[]) null);
- }
- catch (IllegalAccessException e)
- {
- throw new OrchestraException(e);
- }
- catch (InvocationTargetException e)
- {
- throw new OrchestraException(e);
- }
+ method.invoke(bean, (Object[]) null);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new OrchestraException(e);
+ }
+ catch (InvocationTargetException e)
+ {
+ throw new OrchestraException(e);
}
}
- public void invokeInitView(String beanName, Object bean)
+ public boolean invokeInitView(String beanName, Object bean)
{
AnnotationInfo annotationsInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
if (annotationsInfo != null)
@@ -67,11 +64,13 @@
if (method != null)
{
invokeMethod(bean, method);
+ return true;
}
}
+ return false;
}
- public void invokePreRenderView(String beanName, Object bean)
+ public boolean invokePreRenderView(String beanName, Object bean)
{
AnnotationInfo annotationsInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
if (annotationsInfo != null)
@@ -80,11 +79,13 @@
if (method != null)
{
invokeMethod(bean, method);
+ return true;
}
}
+ return false;
}
- public void invokePreProcess(String beanName, Object bean)
+ public boolean invokePreProcess(String beanName, Object bean)
{
AnnotationInfo annotationsInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
if (annotationsInfo != null)
@@ -93,7 +94,9 @@
if (method != null)
{
invokeMethod(bean, method);
+ return true;
}
}
+ return false;
}
}
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java Sun Aug 19 05:31:51 2007
@@ -20,16 +20,6 @@
package org.apache.myfaces.orchestra.viewController;
-import org.apache.myfaces.orchestra.annotation.AnnotationInfoManager;
-import org.apache.myfaces.orchestra.annotation.AnnotationInfo;
-import org.apache.myfaces.orchestra.conversation.annotations.ConversationRequire;
-import org.apache.myfaces.orchestra.conversation.ConversationManager;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
-import org.apache.myfaces.orchestra.lib.OrchestraException;
-import org.apache.commons.lang.StringUtils;
-
-import java.io.IOException;
-
/**
* A {@link org.apache.myfaces.orchestra.viewController.ViewControllerManager} implementation which uses
* annotations on backing beans to determine the beans responsible for a given view and execute
@@ -40,15 +30,20 @@
* then used to locate a bean which has a ViewController annotation that references the current view.</p>
*
* <p>See also org.apache.myfaces.orchestra.viewController.annotations.*.</p>
+ *
+ * <p>
+ * Notice: For backward compatiblity with the Orchestra-core module this ViewControllerManager
+ * will take the Orchestra-core naming strategy
+ * into account and uses reflection if no annotated method were found.
+ * </p>
*
* @see org.apache.myfaces.orchestra.viewController.ViewControllerManager
+ * @see org.apache.myfaces.orchestra.viewController.PlainAnnotationsViewControllerManager
*/
-public class AnnotationsViewControllerManager extends AbstractViewControllerManager
+public class AnnotationsViewControllerManager extends AbstractAnnotationsViewControllerManager
{
- private AnnotationInfoManager annotationInfoManager;
-
private ViewControllerNameMapper viewControllerNameMapper;
- private AbstractViewControllerExecutor abstractViewControllerExecutor;
+ private ViewControllerExecutor viewControllerExecutor;
public AnnotationsViewControllerManager()
{
@@ -62,16 +57,19 @@
new CompositeViewControllerNameMapper(
new ViewControllerNameMapper[]
{
- new AnnotationsViewControllerNameMapper(annotationInfoManager),
+ new AnnotationsViewControllerNameMapper(getAnnotationInfoManager()),
new DefaultViewControllerNameMapper()
});
- abstractViewControllerExecutor = new AnnotationsViewControllerExecutor(annotationInfoManager);
- }
-
- public void setAnnotationInfoManager(AnnotationInfoManager annotationInfoManager)
- {
- this.annotationInfoManager = annotationInfoManager;
+ // Set things up so that executing a method first using an
+ // AnnotationsViewControllerExecutor, then a ReflectiveViewControllerExecutor.
+ viewControllerExecutor =
+ new CompositeViewControllerExecutor(
+ new ViewControllerExecutor[]
+ {
+ new AnnotationsViewControllerExecutor(getAnnotationInfoManager()),
+ new ReflectiveViewControllerExecutor()
+ });
}
protected ViewControllerNameMapper getViewControllerNameMapper()
@@ -79,72 +77,8 @@
return viewControllerNameMapper;
}
- protected AbstractViewControllerExecutor getViewControllerExecutor()
- {
- return abstractViewControllerExecutor;
- }
-
- public void assertConversationState(String viewId)
+ protected ViewControllerExecutor getViewControllerExecutor()
{
- String beanName = getViewControllerNameMapper().mapViewId(viewId);
- if (beanName == null)
- {
- return;
- }
-
- AnnotationInfo annotationInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
- if (annotationInfo == null || annotationInfo.getConversationRequire() == null)
- {
- return;
- }
-
- ConversationRequire conversationRequire = annotationInfo.getConversationRequire();
-
- // check if we are on an entry-point-page
- String[] entryPoints = conversationRequire.entryPointViewIds();
- if (entryPoints != null && entryPoints.length > 0)
- {
- for (int i = 0; i<entryPoints.length; i++)
- {
- String entryPoint = entryPoints[i];
- if (entryPoint.equals(viewId))
- {
- // yes ... no need to check
- return;
- }
- }
- }
-
- String[] conversationNames = conversationRequire.conversationNames();
- if (conversationNames == null || conversationNames.length < 1)
- {
- // wrong configuration?
- return;
- }
-
- ConversationManager manager = ConversationManager.getInstance();
- for (int i = 0; i<conversationNames.length; i++)
- {
- String conversationName = conversationNames[i];
-
- if (!manager.hasConversation(conversationName))
- {
- if (!StringUtils.isEmpty(conversationRequire.redirect()))
- {
- try
- {
- FrameworkAdapter.getInstance().redirect(conversationRequire.redirect());
- }
- catch (IOException e)
- {
- throw new OrchestraException(e);
- }
- }
- else if (!StringUtils.isEmpty(conversationRequire.navigationAction()))
- {
- FrameworkAdapter.getInstance().invokeNavigation(conversationRequire.navigationAction());
- }
- }
- }
+ return viewControllerExecutor;
}
}
Copied: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/PlainAnnotationsViewControllerManager.java (from r567385, myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/PlainAnnotationsViewControllerManager.java?view=diff&rev=567391&p1=myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java&r1=567385&p2=myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/PlainAnnotationsViewControllerManager.java&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/AnnotationsViewControllerManager.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/viewController/PlainAnnotationsViewControllerManager.java Sun Aug 19 05:31:51 2007
@@ -20,58 +20,41 @@
package org.apache.myfaces.orchestra.viewController;
-import org.apache.myfaces.orchestra.annotation.AnnotationInfoManager;
+import org.apache.commons.lang.StringUtils;
import org.apache.myfaces.orchestra.annotation.AnnotationInfo;
-import org.apache.myfaces.orchestra.conversation.annotations.ConversationRequire;
import org.apache.myfaces.orchestra.conversation.ConversationManager;
+import org.apache.myfaces.orchestra.conversation.annotations.ConversationRequire;
import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
import org.apache.myfaces.orchestra.lib.OrchestraException;
-import org.apache.commons.lang.StringUtils;
import java.io.IOException;
/**
- * A {@link org.apache.myfaces.orchestra.viewController.ViewControllerManager} implementation which uses
+ * A {@link ViewControllerManager} implementation which uses
* annotations on backing beans to determine the beans responsible for a given view and execute
* the appropriate annotated methods.
*
* <p>When using Spring, every bean declaration in the spring config files is checked to see if the
* referenced class has annotations, and if so that information is cached. Here, that information is
* then used to locate a bean which has a ViewController annotation that references the current view.</p>
- *
+ *
* <p>See also org.apache.myfaces.orchestra.viewController.annotations.*.</p>
- *
- * @see org.apache.myfaces.orchestra.viewController.ViewControllerManager
+ *
+ * @see ViewControllerManager
*/
-public class AnnotationsViewControllerManager extends AbstractViewControllerManager
+public class PlainAnnotationsViewControllerManager extends AbstractAnnotationsViewControllerManager
{
- private AnnotationInfoManager annotationInfoManager;
-
private ViewControllerNameMapper viewControllerNameMapper;
- private AbstractViewControllerExecutor abstractViewControllerExecutor;
+ private ViewControllerExecutor viewControllerExecutor;
- public AnnotationsViewControllerManager()
+ public PlainAnnotationsViewControllerManager()
{
}
public void initManager()
{
- // Set things up so that finding a bean-name for a viewId looks first using an
- // AnnotationsViewControllerNameMapper, then a DefaultViewControllerNameMapper.
- viewControllerNameMapper =
- new CompositeViewControllerNameMapper(
- new ViewControllerNameMapper[]
- {
- new AnnotationsViewControllerNameMapper(annotationInfoManager),
- new DefaultViewControllerNameMapper()
- });
-
- abstractViewControllerExecutor = new AnnotationsViewControllerExecutor(annotationInfoManager);
- }
-
- public void setAnnotationInfoManager(AnnotationInfoManager annotationInfoManager)
- {
- this.annotationInfoManager = annotationInfoManager;
+ viewControllerNameMapper = new AnnotationsViewControllerNameMapper(getAnnotationInfoManager());
+ viewControllerExecutor = new AnnotationsViewControllerExecutor(getAnnotationInfoManager());
}
protected ViewControllerNameMapper getViewControllerNameMapper()
@@ -79,9 +62,9 @@
return viewControllerNameMapper;
}
- protected AbstractViewControllerExecutor getViewControllerExecutor()
+ protected ViewControllerExecutor getViewControllerExecutor()
{
- return abstractViewControllerExecutor;
+ return viewControllerExecutor;
}
public void assertConversationState(String viewId)
@@ -92,7 +75,7 @@
return;
}
- AnnotationInfo annotationInfo = annotationInfoManager.getAnnotationInfoByBeanName(beanName);
+ AnnotationInfo annotationInfo = getAnnotationInfoManager().getAnnotationInfoByBeanName(beanName);
if (annotationInfo == null || annotationInfo.getConversationRequire() == null)
{
return;
@@ -104,7 +87,7 @@
String[] entryPoints = conversationRequire.entryPointViewIds();
if (entryPoints != null && entryPoints.length > 0)
{
- for (int i = 0; i<entryPoints.length; i++)
+ for (int i = 0; i < entryPoints.length; i++)
{
String entryPoint = entryPoints[i];
if (entryPoint.equals(viewId))
@@ -123,7 +106,7 @@
}
ConversationManager manager = ConversationManager.getInstance();
- for (int i = 0; i<conversationNames.length; i++)
+ for (int i = 0; i < conversationNames.length; i++)
{
String conversationName = conversationNames[i];
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml Sun Aug 19 05:31:51 2007
@@ -91,6 +91,11 @@
</filter>
<filter>
+ <filter-name>frameworkAdapterFilter</filter-name>
+ <filter-class>org.apache.myfaces.orchestra.frameworkAdapter.jsf.FrameworkAdapterServletFilter</filter-class>
+ </filter>
+
+ <filter>
<filter-name>orchestraFilter</filter-name>
<filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
</filter>
@@ -101,17 +106,22 @@
</filter-mapping>
<filter-mapping>
- <filter-name>FacesExtensionsFilter</filter-name>
- <url-pattern>/faces/*</url-pattern>
+ <filter-name>frameworkAdapterFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
- <filter-name>orchestraFilter</filter-name>
- <url-pattern>*.faces</url-pattern>
+ <filter-name>requestParameterFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
- <filter-name>requestParameterFilter</filter-name>
+ <filter-name>FacesExtensionsFilter</filter-name>
+ <url-pattern>/faces/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>orchestraFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/annotations/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/annotations/index.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/annotations/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/annotations/index.jsp Sun Aug 19 05:31:51 2007
@@ -22,4 +22,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("start.faces"); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("start.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/ballot/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/ballot/index.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/ballot/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/ballot/index.jsp Sun Aug 19 05:31:51 2007
@@ -18,4 +18,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("Hall.faces"); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("Hall.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp Sun Aug 19 05:31:51 2007
@@ -22,4 +22,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("ComponentSelection.faces"); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("ComponentSelection.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/index.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/index.jsp Sun Aug 19 05:31:51 2007
@@ -22,4 +22,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("start.faces"); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("start.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/multiBean/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/multiBean/index.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/multiBean/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/multiBean/index.jsp Sun Aug 19 05:31:51 2007
@@ -22,4 +22,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("start.faces"); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("start.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp?view=diff&rev=567391&r1=567390&r2=567391
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp Sun Aug 19 05:31:51 2007
@@ -39,7 +39,7 @@
</h:outputLink>
</t:htmlTag>
<t:htmlTag value="li">
- <h:outputLink value="configurator" >
+ <h:outputLink value="configurator/index.jsp" >
<h:outputText value="A PC Konfigurator" />
</h:outputLink>
</t:htmlTag>