You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/02/06 10:45:39 UTC

svn commit: r618939 - /myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml

Author: skitching
Date: Wed Feb  6 01:45:36 2008
New Revision: 618939

URL: http://svn.apache.org/viewvc?rev=618939&view=rev
Log:
Simplify web.xml

Modified:
    myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml

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?rev=618939&r1=618938&r2=618939&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/web.xml Wed Feb  6 01:45:36 2008
@@ -61,14 +61,6 @@
 		<param-value>client</param-value>
 	</context-param>
 
-    <!-- 
-      - TODO: document why this is here...
-      -->
-	<context-param>
-		<param-name>javax.servlet.jsptl.ExpressionEvaluatorClass</param-name>
-		<param-value>org.apache.taglibs.jsptl.lang.spel.Evaluator</param-value>
-	</context-param>
-
     <!--
       - JSF works much better with javascript; many components do not function
       - or function in a degraded fashion when scripting is enabled. Here, we
@@ -96,17 +88,23 @@
 		<param-value>true</param-value>
 	</context-param>
 
-    <!-- why not use the default? -->
-	<context-param>
-		<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
-		<param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
-	</context-param>
-
     <!--
-      - After a redirect, reattach JSF messages present on the original view to the new
-      - view. Some of the examples use redirection to move between pages.
+      - The RedirectTrackerManager is a component from the MyFaces Sandbox project. It
+      - allows <redirect> to be used in navigation rules without the normal limitations.
       -
-      - The redirectTracker is from the MyFaces Sandbox project.
+      - JSF apps often use the pattern that one bean handles a postback, then stores some
+      - data in request scope and navigates via an internal forward to a new view which
+      - then uses that data. However doing an internal forward does not update the web
+      - browser's displayed url. Marking the nagivation as a <redirect> will update the
+      - browser url, but all request-scoped data is lost. The RedirectTracker temporarily
+      - stores request-scoped data in the session then reattaches it to the following
+      - request, allowing redirects to be used with request-scoped data. JSF error messages
+      - (FacesMessage objects) are also in request scope (attached to a request-scoped
+      - FacesContext object), so redirecting also loses messages assigned by the previous
+      - view. 
+      -
+      - This examples app only needs to preserve messages, not request-scoped-data, across
+      - redirects so just that functionality of the RedirectTrackerManager is enabled here.
       -->
 	<context-param>
 		<param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
@@ -123,13 +121,6 @@
 		<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
 	</filter>
 
-	<!-- in case you use security constraints you might need this filter
-	<filter>
-		<filter-name>springRequestContextFilter</filter-name>
-		<filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
-	</filter>
-	-->
-
     <!--
       - Force the request contents to be interpreted as UTF-8. This solves some problems
       - with non-ascii data in submitted fields.
@@ -177,15 +168,6 @@
 		<url-pattern>/*</url-pattern>
 	</filter-mapping>
 
-	<!--
-	<filter-mapping>
-		<filter-name>springRequestContextFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-		<dispatcher>FORWARD</dispatcher>
-		<dispatcher>REQUEST</dispatcher>
-	</filter-mapping>
-	-->
-
 	<filter-mapping>
 		<filter-name>basicFrameworkAdapterFilter</filter-name>
 		<url-pattern>*.jsp</url-pattern>
@@ -207,7 +189,7 @@
 	</filter-mapping>
 
    <!--
-     - Set up standard MyFaces stuff.
+     - Set up standard MyFaces-Tomahawk stuff.
      -->
 	<filter-mapping>
 		<filter-name>TomahawkExtensionsFilter</filter-name>
@@ -215,7 +197,6 @@
 	</filter-mapping>
 
 	<filter-mapping>
-<!-- TODO: map this to the FacesServlet, not to a url -->
 		<filter-name>TomahawkExtensionsFilter</filter-name>
 		<url-pattern>*.faces</url-pattern>
 	</filter-mapping>