cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r884437 - /cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java
Date Thu, 26 Nov 2009 07:49:36 GMT
Author: reinhard
Date: Thu Nov 26 07:49:35 2009
New Revision: 884437

URL: http://svn.apache.org/viewvc?rev=884437&view=rev
Log:
provide a property 'ssf' that returns true of false depending whether the current request
is an internal Servlet-Service framework request. This can be used e.g. with the expression
{jexl:cocoon.request.ssf}

Modified:
    cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java

Modified: cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java?rev=884437&r1=884436&r2=884437&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/util/ObjectModelProvider.java
Thu Nov 26 07:49:35 2009
@@ -22,6 +22,7 @@
 import javax.servlet.http.HttpServletRequestWrapper;
 
 import org.apache.cocoon.servlet.controller.ControllerContextHelper;
+import org.apache.cocoon.servletservice.util.ServletServiceRequest;
 import org.apache.cocoon.sitemap.objectmodel.ObjectModel;
 
 public class ObjectModelProvider {
@@ -59,5 +60,13 @@
         public String get(String key) {
             return this.getParameter(key);
         }
+
+        public boolean isSsf() {
+            if(this.getRequest() instanceof ServletServiceRequest) {
+                return true;
+            }
+
+            return false;
+        }
     }
 }



Mime
View raw message