xlawrence    2005/05/19 15:45:21 CEST

  Modified files:
    core/src/java/org/jahia/services/applications 
                                                  
StrutsRequestDispatcherProcessor.java 
  Log:
  Commented out unexistring Struts Globals Constants
  
  Revision  Changes    Path
  1.2       +92 -82    
jahia/core/src/java/org/jahia/services/applications/StrutsRequestDispatcherProcessor.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/applications/StrutsRequestDispatcherProcessor.java.diff?r1=1.1&r2=1.2&f=h
  
  
  
  Index: StrutsRequestDispatcherProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/services/applications/StrutsRequestDispatcherProcessor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StrutsRequestDispatcherProcessor.java     30 Mar 2004 14:11:52 -0000      
1.1
  +++ StrutsRequestDispatcherProcessor.java     19 May 2005 13:45:21 -0000      
1.2
  @@ -17,116 +17,126 @@
    */
   public class StrutsRequestDispatcherProcessor implements
           RequestDispatcherProcessor {
  -
  +    
       private boolean preProcessed = false;
       private boolean postProcessed = false;
  -
  +    
       private static String[] attributeNames;
       private static String[] attributeScopes;
  -
  +    
       private Vector attributes;
  -
  -
  +    
  +    
       static {
  -
  -        String[] names = {Globals.ACTION_SERVLET_KEY, 
Globals.APPLICATION_KEY,
  -                          Globals.CANCEL_KEY, Globals.DATA_SOURCE_KEY, 
Globals.ERROR_KEY,
  -                          Globals.EXCEPTION_KEY, Globals.FORM_BEANS_KEY, 
Globals.FORWARDS_KEY,
  -                          Globals.LOCALE_KEY, Globals.MAPPING_KEY, 
Globals.MAPPINGS_KEY,
  -                          Globals.MESSAGE_KEY, Globals.MESSAGES_KEY, 
Globals.MODULE_KEY,
  -                          Globals.MULTIPART_KEY, Globals.PLUG_INS_KEY,
  -                          Globals.REQUEST_PROCESSOR_KEY, Globals.SERVLET_KEY,
  -                          Globals.TRANSACTION_TOKEN_KEY};
  +        
  +        String[] names = {Globals.ACTION_SERVLET_KEY,
  +                // Globals.APPLICATION_KEY,
  +                Globals.CANCEL_KEY,
  +                Globals.DATA_SOURCE_KEY,
  +                Globals.ERROR_KEY,
  +                Globals.EXCEPTION_KEY,
  +                // Globals.FORM_BEANS_KEY,
  +                // Globals.FORWARDS_KEY,
  +                Globals.LOCALE_KEY,
  +                Globals.MAPPING_KEY,
  +                // Globals.MAPPINGS_KEY,
  +                Globals.MESSAGE_KEY,
  +                Globals.MESSAGES_KEY,
  +                Globals.MODULE_KEY,
  +                Globals.MULTIPART_KEY,
  +                Globals.PLUG_INS_KEY,
  +                Globals.REQUEST_PROCESSOR_KEY,
  +                Globals.SERVLET_KEY,
  +                Globals.TRANSACTION_TOKEN_KEY};
           attributeNames = names;
  -
  +                
           String[] scopes = {StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.SESSION_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.REQUEST_SCOPE,
  -                           StrutsGlobalAttribute.SESSION_SCOPE};
  -        attributeScopes = scopes;
  -
  -    }
  -
  -    public StrutsRequestDispatcherProcessor () {
  -        initAttributes ();
  -    }
  -
  -    public void preForward (ServletIncludeRequestWrapper request,
  -                            ServletIncludeResponseWrapper response)
  -            throws ServletException, java.io.IOException {
  -        backupGlobalAttributes (request, response);
  -    }
  -
  -    public void postForward (ServletIncludeRequestWrapper request,
  -                             ServletIncludeResponseWrapper response)
  -            throws ServletException, java.io.IOException {
  -        restoreGlobalAttributes (request, response);
  -    }
  -
  -    public void preInclude (ServletIncludeRequestWrapper request,
  -                            ServletIncludeResponseWrapper response)
  -            throws ServletException, java.io.IOException {
  -        backupGlobalAttributes (request, response);
  -    }
  -
  -    public void postInclude (ServletIncludeRequestWrapper request,
  -                             ServletIncludeResponseWrapper response)
  -            throws ServletException, java.io.IOException {
  -        restoreGlobalAttributes (request, response);
  -    }
  -
  -    private void backupGlobalAttributes (ServletIncludeRequestWrapper 
request,
  -                                         ServletIncludeResponseWrapper 
response)
  +                        // StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        //  StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        //  StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.SESSION_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        //  StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.REQUEST_SCOPE,
  +                        StrutsGlobalAttribute.SESSION_SCOPE};
  +        attributeScopes = scopes;                  
  +    }
  +    
  +    public StrutsRequestDispatcherProcessor() {
  +        initAttributes();
  +    }
  +    
  +    public void preForward(ServletIncludeRequestWrapper request,
  +            ServletIncludeResponseWrapper response)
  +            throws ServletException, java.io.IOException {
  +        backupGlobalAttributes(request, response);
  +    }
  +    
  +    public void postForward(ServletIncludeRequestWrapper request,
  +            ServletIncludeResponseWrapper response)
  +            throws ServletException, java.io.IOException {
  +        restoreGlobalAttributes(request, response);
  +    }
  +    
  +    public void preInclude(ServletIncludeRequestWrapper request,
  +            ServletIncludeResponseWrapper response)
  +            throws ServletException, java.io.IOException {
  +        backupGlobalAttributes(request, response);
  +    }
  +    
  +    public void postInclude(ServletIncludeRequestWrapper request,
  +            ServletIncludeResponseWrapper response)
  +            throws ServletException, java.io.IOException {
  +        restoreGlobalAttributes(request, response);
  +    }
  +    
  +    private void backupGlobalAttributes(ServletIncludeRequestWrapper request,
  +            ServletIncludeResponseWrapper response)
               throws ServletException, java.io.IOException {
           if (!preProcessed) {
  -            int size = this.attributes.size ();
  +            int size = this.attributes.size();
               StrutsGlobalAttribute at = null;
               for (int i = 0; i < size; i++) {
  -                at = (StrutsGlobalAttribute) this.attributes.get (i);
  -                at.backupAttribute (request, response);
  +                at = (StrutsGlobalAttribute) this.attributes.get(i);
  +                at.backupAttribute(request, response);
               }
           }
       }
  -
  -    private void restoreGlobalAttributes (ServletIncludeRequestWrapper 
request,
  -                                          ServletIncludeResponseWrapper 
response)
  +    
  +    private void restoreGlobalAttributes(ServletIncludeRequestWrapper 
request,
  +            ServletIncludeResponseWrapper response)
               throws ServletException, java.io.IOException {
           if (!postProcessed) {
  -            int size = this.attributes.size ();
  +            int size = this.attributes.size();
               StrutsGlobalAttribute at = null;
               for (int i = 0; i < size; i++) {
  -                at = (StrutsGlobalAttribute) this.attributes.get (i);
  -                at.restoreAttribute (request, response);
  +                at = (StrutsGlobalAttribute) this.attributes.get(i);
  +                at.restoreAttribute(request, response);
               }
           }
       }
  -
  +    
       /**
        *
        */
  -    private void initAttributes () {
  -        this.attributes = new Vector ();
  -
  +    private void initAttributes() {
  +        this.attributes = new Vector();
  +        
           int length = attributeNames.length;
           for (int i = 0; i < length; i++) {
               StrutsGlobalAttribute at =
  -                    new StrutsGlobalAttribute (attributeNames[i], 
attributeScopes[i]);
  -            this.attributes.add (at);
  +                    new StrutsGlobalAttribute(attributeNames[i], 
attributeScopes[i]);
  +            this.attributes.add(at);
           }
       }
   }
  

Reply via email to