cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r753635 - in /cocoon/cocoon3/trunk/cocoon-servlet/src/main: java/org/apache/cocoon/servlet/node/RedirectNode.java resources/cocoon-servlet-1.0.xsd
Date Sat, 14 Mar 2009 11:02:36 GMT
Author: gkossakowski
Date: Sat Mar 14 11:02:36 2009
New Revision: 753635

URL: http://svn.apache.org/viewvc?rev=753635&view=rev
Log:
Make @uri attribute of redirect-to node required.

This change has been discussed here:
http://thread.gmane.org/gmane.text.xml.cocoon.devel/79789

Modified:
    cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/node/RedirectNode.java
    cocoon/cocoon3/trunk/cocoon-servlet/src/main/resources/cocoon-servlet-1.0.xsd

Modified: cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/node/RedirectNode.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/node/RedirectNode.java?rev=753635&r1=753634&r2=753635&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/node/RedirectNode.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/node/RedirectNode.java
Sat Mar 14 11:02:36 2009
@@ -33,6 +33,9 @@
      */
     @Override
     public InvocationResult invoke(Invocation invocation) {
+    	if (!this.getParameters().containsKey("uri"))
+    		throw new IllegalArgumentException("redirect-to node has no @uri attribute configured.");
+    	
         // install the component
         invocation.installComponent("redirector", this.getParameters());
 

Modified: cocoon/cocoon3/trunk/cocoon-servlet/src/main/resources/cocoon-servlet-1.0.xsd
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-servlet/src/main/resources/cocoon-servlet-1.0.xsd?rev=753635&r1=753634&r2=753635&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-servlet/src/main/resources/cocoon-servlet-1.0.xsd (original)
+++ cocoon/cocoon3/trunk/cocoon-servlet/src/main/resources/cocoon-servlet-1.0.xsd Sat Mar
14 11:02:36 2009
@@ -24,7 +24,7 @@
       <xsd:documentation>Redirect to another URI.</xsd:documentation>
     </xsd:annotation>
     <xsd:complexType>
-      <xsd:attribute name="uri" type="xsd:string" use="optional">
+      <xsd:attribute name="uri" type="xsd:string" use="required">
         <xsd:annotation>
           <xsd:documentation>
             The target where the redirect should go to. Relative URIs are resolved relative
to the sitemap. http: and



Mime
View raw message