Way Cool! Our patch is in!

Now, we have to:

A) update the version of turbine we are using in Jetspeed

B) apply the other patch I made and posted to this list that changes all our
redirect attempts to do things the new, turbine supported way.

We need to do these together, else things will be broken - but then, they
are broken now.

I've attached that patch again here.

- Glenn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 28, 2002 9:00 PM
To: [EMAIL PROTECTED]
Subject: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/modules/pages DefaultPage.java


jmcnally    02/03/28 18:00:02

  Modified:    .        build.xml
               src/java/org/apache/turbine Turbine.java
               src/java/org/apache/turbine/modules/pages DefaultPage.java
  Log:
  patch by  Glenn Golden <[EMAIL PROTECTED]>
  
  To follow the Servlet HTTP rules, we must do the redirect before
committing
  any headers or body to the response, and once we do a redirect we must not
  do anything else with the response.
  
  Revision  Changes    Path
  1.11      +1 -0      jakarta-turbine-2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml 13 Mar 2002 04:45:00 -0000      1.10
  +++ build.xml 29 Mar 2002 02:00:02 -0000      1.11
  @@ -241,6 +241,7 @@
               depends="prepare, prepare-jsp, prepare-freemarker,
prepare-python,
                        prepare-webmacro, prepare-log4java, prepare-castor"
               description="--> compiles the source code">
  +
           <javac srcdir="${build.src}"
               destdir="${build.dest}"
               excludes="**/package.html,**/*Test.java"
  
  
  
  1.12      +61 -42
jakarta-turbine-2/src/java/org/apache/turbine/Turbine.java
  
  Index: Turbine.java
  ===================================================================
  RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/Turbine.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Turbine.java      13 Mar 2002 19:44:19 -0000      1.11
  +++ Turbine.java      29 Mar 2002 02:00:02 -0000      1.12
  @@ -117,7 +117,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Sean Legassick</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Martin Poeschl</a>
  - * @version $Id: Turbine.java,v 1.11 2002/03/13 19:44:19 mpoeschl Exp $
  + * @version $Id: Turbine.java,v 1.12 2002/03/29 02:00:02 jmcnally Exp $
    */
   public class Turbine
       extends HttpServlet
  @@ -376,6 +376,9 @@
           throws IOException,
                  ServletException
       {
  +        // set to true if the request is to be redirected by the page
  +        boolean requestRedirected = false;
  +
           // Placeholder for the RunData object.
           RunData data = null;
           try
  @@ -584,46 +587,57 @@
                       AccessControlList.SESSION_KEY);
               }
   
  -            try
  +            // handle a redirect request
  +            requestRedirected = ((data.getRedirectURI() != null) 
  +                && (data.getRedirectURI().length() > 0));
  +            if (requestRedirected)
               {
  -                if ( data.isPageSet() == false &&
  -                     data.isOutSet() == false )
  -                    throw new Exception ( "Nothing to output" );
  -
  -                // We are all done! if isPageSet() output that way
  -                // otherwise, data.getOut() has already been written
  -                // to the data.getOut().close() happens below in the
  -                // finally.
  -                if ( data.isPageSet() && data.isOutSet() == false )
  -                {
  -                    // Modules can override these.
  -                    data.getResponse()
  -                        .setLocale( data.getLocale() );
  -                    data.getResponse()
  -                        .setContentType( data.getContentType() );
  -
  -                    // Handle the case where a module may want to send
  -                    // a redirect.
  -                    if ( ( data.getStatusCode() == 301 ||
  -                           data.getStatusCode() ==  302 ) &&
  -                         data.getRedirectURI() != null )
  +                if (data.getResponse().isCommitted())
  +                {
  +                    requestRedirected = false;
  +                    log ("redirect requested, response already committed:
" + 
  +                         data.getRedirectURI());
  +                }
  +                else
  +                {
  +
data.getResponse().sendRedirect(data.getRedirectURI());
  +                }
  +            }
  +
  +            if (!requestRedirected)
  +            {
  +                try
  +                {
  +                    if ( data.isPageSet() == false &&
  +                        data.isOutSet() == false )
  +                        throw new Exception ( "Nothing to output" );
  +
  +                    // We are all done! if isPageSet() output that way
  +                    // otherwise, data.getOut() has already been written
  +                    // to the data.getOut().close() happens below in the
  +                    // finally.
  +                    if ( data.isPageSet() && data.isOutSet() == false )
                       {
  +                        // Modules can override these.
                           data.getResponse()
  -                            .sendRedirect ( data.getRedirectURI() );
  -                    }
  +                            .setLocale( data.getLocale() );
  +                        data.getResponse()
  +                            .setContentType( data.getContentType() );
   
  -                    // Set the status code.
  -                    data.getResponse().setStatus ( data.getStatusCode()
);
  -                    // Output the Page.
  -                    data.getPage().output (data.getOut());
  +                        // Set the status code.
  +                        data.getResponse().setStatus (
data.getStatusCode() );
  +                        // Output the Page.
  +                        data.getPage().output (data.getOut());
  +                    }
  +                }
  +                catch ( Exception e )
  +                {
  +                    // The output stream was probably closed by the
client
  +                    // end of things ie: the client clicked the Stop
  +                    // button on the browser, so ignore any errors that
  +                    // result.
  +                    Log.debug("Output stream closed? ", e);
                   }
  -            }
  -            catch ( Exception e )
  -            {
  -                // The output stream was probably closed by the client
  -                // end of things ie: the client clicked the Stop
  -                // button on the browser, so ignore any errors that
  -                // result.
               }
           }
           catch ( Exception e )
  @@ -637,13 +651,18 @@
           finally
           {
               // Make sure to close the outputstream when we are done.
  -            try
  +            // Note: not for redirects, when we must not get a
printwriter on 
  +            // the response output stream.
  +            if (!requestRedirected)
               {
  -                data.getOut().close();
  -            }
  -            catch (Exception e)
  -            {
  -                // Ignore.
  +                try
  +                {
  +                    data.getOut().close();
  +                }
  +                catch (Exception e)
  +                {
  +                    // Ignore.
  +                }
               }
   
               // Return the used RunData to the factory for recycling.
  
  
  
  1.2       +4 -1
jakarta-turbine-2/src/java/org/apache/turbine/modules/pages/DefaultPage.java
  
  Index: DefaultPage.java
  ===================================================================
  RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/modules/pages/Defaul
tPage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultPage.java  16 Aug 2001 05:08:36 -0000      1.1
  +++ DefaultPage.java  29 Mar 2002 02:00:02 -0000      1.2
  @@ -119,7 +119,7 @@
    * written by John McNally.  I've only modified it for WebMacro use.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dave Bryson</a>
  - * @version $Id: DefaultPage.java,v 1.1 2001/08/16 05:08:36 jvanzyl Exp $
  + * @version $Id: DefaultPage.java,v 1.2 2002/03/29 02:00:02 jmcnally Exp
$
    */
   public class DefaultPage extends Page
   {
  @@ -142,6 +142,9 @@
           {
               ActionLoader.getInstance().exec ( data, data.getAction() );
           }
  +
  +        // if a redirect was setup in data, don't do anything else
  +        if ((data.getRedirectURI() != null) &&
(data.getRedirectURI().length() > 0)) return;
   
           // Set the default doctype from the value given in
           // TurbineResources.properties.
  
  
  

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Index: src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java,v
retrieving revision 1.30
diff -u -r1.30 CreateNewUserAndConfirm.java
--- src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java   25 Mar 
2002 21:35:23 -0000      1.30
+++ src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java   26 Mar 
+2002 19:13:10 -0000
@@ -291,12 +291,12 @@
           data.setACL(acl);
           data.save();
 
-          // bring logged on user to homepage with internal redirect
+          // bring logged on user to homepage via redirect
           //data.setScreenTemplate(TurbineTemplate.getDefaultScreen());
           //data.setScreenTemplate("Home");
           DynamicURI duri = new DynamicURI (data);
           duri.addPathInfo(JetspeedResources.PATH_TEMPLATE_KEY, "Home");
-          data.getResponse().sendRedirect(duri.toString());
+          data.setRedirectURI(duri.toString());
 
         }
         catch ( Exception e )
Index: 
src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java,v
retrieving revision 1.8
diff -u -r1.8 MultiColumnControllerAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
   25 Mar 2002 21:35:23 -0000      1.8
+++ 
+src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
+   26 Mar 2002 19:13:10 -0000
@@ -349,19 +349,8 @@
         {
             ((JetspeedRunData)data).setMode("default");
 
-            try
-            {
-                // bring logged on user to homepage with internal redirect
-                DynamicURI duri = new DynamicURI(data);
-                data.getResponse().sendRedirect(duri.toString());
-            }
-            catch ( Exception e )
-            {
-                Log.error(e);
-                data.setMessage(e.toString());
-                data.setStackTrace(StringUtils.stackTrace(e), e);
-                
data.setScreenTemplate(JetspeedResources.getString("template.error","Error"));
-            }
+            // bring logged on user to homepage via HTTP redirect
+            data.setRedirectURI(new DynamicURI(data).toString());
         }
     }
 
Index: 
src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java,v
retrieving revision 1.9
diff -u -r1.9 RowColumnControllerAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java
     25 Mar 2002 21:35:23 -0000      1.9
+++ 
+src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java
+     26 Mar 2002 19:13:11 -0000
@@ -292,19 +292,8 @@
         {
             ((JetspeedRunData)data).setMode("default");
 
-            try
-            {
-                // bring logged on user to homepage with internal redirect
-                DynamicURI duri = new DynamicURI(data);
-                data.getResponse().sendRedirect(duri.toString());
-            }
-            catch ( Exception e )
-            {
-                Log.error(e);
-                data.setMessage(e.toString());
-                data.setStackTrace(StringUtils.stackTrace(e), e);
-                
data.setScreenTemplate(JetspeedResources.getString("template.error","Error"));
-            }
+            // bring logged on user to homepage via HTTP redirect
+            data.setRedirectURI(new DynamicURI(data).toString());
         }
     }
 
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java,v
retrieving revision 1.4
diff -u -r1.4 GroupUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java  
     25 Mar 2002 21:35:23 -0000      1.4
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java 
+      26 Mar 2002 19:13:12 -0000
@@ -199,7 +199,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_GROUP_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_INVALID_ENTITY_NAME);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 rundata.getUser().setTemp(TEMP_GROUP, null);
                 return;
             }
@@ -226,7 +226,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_GROUP_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (group != null)
@@ -272,7 +272,7 @@
             if (group != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
            // save values that user just entered so they don't have to re-enter
            if (group != null)
@@ -320,7 +320,7 @@
             if (group != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_DELETE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (group != null)
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java,v
retrieving revision 1.3
diff -u -r1.3 PermissionUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java
  25 Mar 2002 21:35:23 -0000      1.3
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java
+  26 Mar 2002 19:13:12 -0000
@@ -199,7 +199,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_PERMISSION_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_INVALID_ENTITY_NAME);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 rundata.getUser().setTemp(TEMP_PERMISSION, null);
                 return;
             }
@@ -226,7 +226,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_PERMISSION_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (permission != null)
@@ -272,7 +272,7 @@
             if (permission != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
permission.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
            // save values that user just entered so they don't have to re-enter
            if (permission != null)
@@ -319,7 +319,7 @@
             if (permission != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
permission.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_DELETE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (permission != null)
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java,v
retrieving revision 1.3
diff -u -r1.3 RolePermissionUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java
      25 Mar 2002 21:35:23 -0000      1.3
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java
+      26 Mar 2002 19:13:13 -0000
@@ -202,7 +202,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             return;
         }
         Role role = JetspeedSecurity.getRole(entityid);
@@ -212,7 +212,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             return;
         }
 
@@ -228,7 +228,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 return;
             }
 
@@ -274,7 +274,7 @@
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_UPDATE_FAILED);
             if (role != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
         }
     }
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java,v
retrieving revision 1.6
diff -u -r1.6 RoleUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java   
     25 Mar 2002 21:35:23 -0000      1.6
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java  
+      26 Mar 2002 19:13:13 -0000
@@ -198,7 +198,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_ROLE_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_INVALID_ENTITY_NAME);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 rundata.getUser().setTemp(TEMP_ROLE, null);
                 return;
             }
@@ -225,7 +225,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_ROLE_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (role != null)
@@ -271,7 +271,7 @@
             if (role != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
            // save values that user just entered so they don't have to re-enter
            if (role != null)
@@ -319,7 +319,7 @@
             if (role != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_DELETE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (role != null)
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java,v
retrieving revision 1.3
diff -u -r1.3 UserRoleUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java
    25 Mar 2002 21:35:23 -0000      1.3
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java
+    26 Mar 2002 19:13:13 -0000
@@ -198,7 +198,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_USERROLE_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             return;
         }
 
@@ -209,7 +209,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_USERROLE_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             return;
         }
 
@@ -224,7 +224,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_USERROLE_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_MISSING_PARAMETER);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 return;
             }
 
@@ -273,7 +273,7 @@
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_UPDATE_FAILED);
             if (user != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
         }
     }
Index: 
src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java,v
retrieving revision 1.10
diff -u -r1.10 UserUpdateAction.java
--- 
src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java   
     25 Mar 2002 21:35:23 -0000      1.10
+++ 
+src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java  
+      26 Mar 2002 19:13:14 -0000
@@ -218,7 +218,7 @@
                 DynamicURI duri = new DynamicURI (rundata);
                 duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_USER_UPDATE);
                 duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_INVALID_ENTITY_NAME);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 // save values that user just entered so they don't have to re-enter
                 if (user != null)
                    rundata.getUser().setTemp(TEMP_USER, user);
@@ -264,7 +264,7 @@
             DynamicURI duri = new DynamicURI (rundata);
             duri.addPathInfo(SecurityConstants.PANE_NAME, 
SecurityConstants.PANEID_USER_UPDATE);
             duri.addPathInfo(SecurityConstants.PARAM_MSGID, 
SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             // save values that user just entered so they don't have to re-enter
             if (user != null)
                rundata.getUser().setTemp(TEMP_USER, user);
@@ -347,7 +347,7 @@
             if (user != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             // save values that user just entered so they don't have to re-enter
             if (user != null)
                 rundata.getUser().setTemp(TEMP_USER, user);
@@ -429,7 +429,7 @@
             if (user != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             // save values that user just entered so they don't have to re-enter
             if (user != null)
                 rundata.getUser().setTemp(TEMP_USER, user);
@@ -463,7 +463,7 @@
                 if (user != null)
                     duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
                 duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 // save values that user just entered so they don't have to re-enter
                 if (user != null)
                    rundata.getUser().setTemp(TEMP_USER, user);
@@ -518,7 +518,7 @@
             if (user != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_UPDATE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
             // save values that user just entered so they don't have to re-enter
             if (user != null)
                rundata.getUser().setTemp(TEMP_USER, user);
@@ -552,7 +552,7 @@
                 if (user != null)
                     duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
                 duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_DELETE);
-                rundata.getResponse().sendRedirect(duri.toString());
+                rundata.setRedirectURI(duri.toString());
                 // save values that user just entered so they don't have to re-enter
                 if (user != null)
                    rundata.getUser().setTemp(TEMP_USER, user);
@@ -579,7 +579,7 @@
             if (user != null)
                 duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, 
user.getUserName());
             duri.addQueryData(SecurityConstants.PARAM_MODE, 
SecurityConstants.PARAM_MODE_DELETE);
-            rundata.getResponse().sendRedirect(duri.toString());
+            rundata.setRedirectURI(duri.toString());
 
             // save values that user just entered so they don't have to re-enter
            if (user != null)

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to