tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/admin/context context.jsp
Date Fri, 14 Jan 2005 23:30:32 GMT
markt       2005/01/14 15:30:32

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        mbeans-descriptors.xml
               webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        ApplicationResources_en.properties
               webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context
                        AddContextAction.java ContextForm.java
                        DeleteContextAction.java DeleteContextForm.java
                        DeleteContextsAction.java EditContextAction.java
                        SaveContextAction.java
               webapps/admin/context context.jsp
  Log:
  Fix bug 33085. Expose privileged attribute of context through admin webapp.
  Also, remove unused imports in o.a.c.webapp.admin.context package
  
  Revision  Changes    Path
  1.84      +5 -1      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- mbeans-descriptors.xml	19 Nov 2004 20:52:02 -0000	1.83
  +++ mbeans-descriptors.xml	14 Jan 2005 23:30:31 -0000	1.84
  @@ -2125,6 +2125,10 @@
                           application"
                    type="boolean"/>
   
  +    <attribute   name="privileged"
  +          description="The privileged flag for this web application"
  +                 type="boolean"/>
  +
       <attribute   name="path"
             description="The context path for this Context"
                    type="java.lang.String"/>
  
  
  
  1.76      +1 -0      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
  
  Index: ApplicationResources_en.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- ApplicationResources_en.properties	22 Jan 2004 02:39:33 -0000	1.75
  +++ ApplicationResources_en.properties	14 Jan 2005 23:30:31 -0000	1.76
  @@ -146,6 +146,7 @@
   context.cross.context=Cross Context
   context.docBase=Document Base
   context.override=Override
  +context.privileged=Privileged
   context.path=Path
   context.reloadable=Reloadable
   context.swallowOutput=Swallow Output
  
  
  
  1.7       +2 -4      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java
  
  Index: AddContextAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/AddContextAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AddContextAction.java	26 Aug 2004 21:56:08 -0000	1.6
  +++ AddContextAction.java	14 Jan 2005 23:30:31 -0000	1.7
  @@ -18,18 +18,15 @@
   
   import java.io.IOException;
   import java.util.Locale;
  -import java.util.ArrayList;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
   import org.apache.struts.action.Action;
  -import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.util.MessageResources;
  -import org.apache.webapp.admin.LabelValueBean;
   import org.apache.webapp.admin.Lists;
   import org.apache.webapp.admin.TomcatTreeBuilder;
   /**
  @@ -96,6 +93,7 @@
           contextFm.setCrossContext("false");
           contextFm.setDocBase("");
           contextFm.setOverride("false");
  +        contextFm.setPrivileged("false");
           contextFm.setPath("");
           contextFm.setReloadable("false");
           contextFm.setSwallowOutput("false");
  
  
  
  1.14      +24 -2     jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java
  
  Index: ContextForm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/ContextForm.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ContextForm.java	26 Aug 2004 21:56:08 -0000	1.13
  +++ ContextForm.java	14 Jan 2005 23:30:31 -0000	1.14
  @@ -22,7 +22,6 @@
   import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionMapping;
  -import java.net.InetAddress;
   import java.util.List;
   
   /**
  @@ -92,6 +91,11 @@
       private String override = "false";
       
       /**
  +     * The value of privileged.
  +     */
  +    private String privileged = "false";
  +    
  +    /**
        * The text for the context path for this context.
        */
       private String path = null;
  @@ -409,6 +413,24 @@
       }
       
       
  +    /**
  +     * Return the privileged value.
  +     */
  +    
  +    public String getPrivileged() {
  +        
  +        return this.privileged;
  +        
  +    }
  +    
  +    /**
  +     * Set the privileged value.
  +     */
  +    public void setPrivileged(String privileged) {
  +        
  +        this.privileged = privileged;
  +        
  +    }
       /**
        * Return the context path.
        */
  
  
  
  1.6       +1 -10     jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextAction.java
  
  Index: DeleteContextAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextAction.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeleteContextAction.java	26 Aug 2004 21:56:08 -0000	1.5
  +++ DeleteContextAction.java	14 Jan 2005 23:30:31 -0000	1.6
  @@ -20,28 +20,19 @@
   import java.io.IOException;
   import java.util.Collections;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.Locale;
  -import java.util.TreeSet;
  -import java.util.Set;
   import java.util.ArrayList;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
   import org.apache.struts.action.Action;
  -import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   
   import javax.management.MBeanServer;
  -import javax.management.MBeanServerFactory;
  -import javax.management.QueryExp;
  -import javax.management.Query;
  -import javax.management.ObjectInstance;
   import javax.management.ObjectName;
  -import javax.management.JMException;
   import org.apache.struts.util.MessageResources;
   
   import org.apache.webapp.admin.ApplicationServlet;
  
  
  
  1.3       +1 -3      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextForm.java
  
  Index: DeleteContextForm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextForm.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteContextForm.java	26 Aug 2004 21:56:08 -0000	1.2
  +++ DeleteContextForm.java	14 Jan 2005 23:30:31 -0000	1.3
  @@ -16,9 +16,7 @@
   
   package org.apache.webapp.admin.context;
   
  -import javax.servlet.http.HttpServletRequest;
   import org.apache.struts.action.ActionForm;
  -import org.apache.struts.action.ActionMapping;
   
   /**
    * Form bean for the "Delete Context" page.
  
  
  
  1.5       +1 -7      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextsAction.java
  
  Index: DeleteContextsAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/DeleteContextsAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeleteContextsAction.java	26 Aug 2004 21:56:08 -0000	1.4
  +++ DeleteContextsAction.java	14 Jan 2005 23:30:31 -0000	1.5
  @@ -18,15 +18,9 @@
   package org.apache.webapp.admin.context;
   
   import java.io.IOException;
  -import java.util.ArrayList;
  -import java.util.Iterator;
   import java.util.Locale;
  -import java.util.Set;
  -import java.util.TreeSet;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  -import javax.management.ObjectInstance;
  -import javax.management.modelmbean.ModelMBean;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpSession;
   import javax.servlet.http.HttpServletRequest;
  
  
  
  1.7       +4 -9      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/EditContextAction.java
  
  Index: EditContextAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/EditContextAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EditContextAction.java	26 Aug 2004 21:56:08 -0000	1.6
  +++ EditContextAction.java	14 Jan 2005 23:30:31 -0000	1.7
  @@ -17,30 +17,22 @@
   package org.apache.webapp.admin.context;
   
   import java.io.IOException;
  -import java.util.Iterator;
  -import java.util.List;
   import java.util.Locale;
  -import java.util.ArrayList;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
   import org.apache.struts.action.Action;
  -import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.util.MessageResources;
   
   import javax.management.MBeanServer;
  -import javax.management.ObjectInstance;
   import javax.management.ObjectName;
  -import javax.management.JMException;
   
   import org.apache.webapp.admin.ApplicationServlet;
  -import org.apache.webapp.admin.LabelValueBean;
   import org.apache.webapp.admin.Lists;
  -import org.apache.webapp.admin.TomcatTreeBuilder;
   
   /**
    * The <code>Action</code> that sets up <em>Edit Context</em> transactions.
  @@ -209,6 +201,9 @@
               contextFm.setSwallowOutput
                   (((Boolean) mBServer.getAttribute(cname, attribute)).toString());
               attribute = "override";
  +            contextFm.setOverride
  +                (((Boolean) mBServer.getAttribute(cname, attribute)).toString());
  +            attribute = "privileged";
               contextFm.setOverride
                   (((Boolean) mBServer.getAttribute(cname, attribute)).toString());
   
  
  
  
  1.14      +11 -1     jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/SaveContextAction.java
  
  Index: SaveContextAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context/SaveContextAction.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SaveContextAction.java	26 Aug 2004 21:56:08 -0000	1.13
  +++ SaveContextAction.java	14 Jan 2005 23:30:31 -0000	1.14
  @@ -275,6 +275,16 @@
               mBServer.setAttribute(coname,
                                     new Attribute("crossContext", new Boolean(crossContext)));
   
  +            attribute = "privileged";
  +            String privileged = "false";
  +            try {
  +                privileged = cform.getPrivileged();
  +            } catch (Throwable t) {
  +                privileged = "false";
  +            }
  +            mBServer.setAttribute(coname,
  +                                  new Attribute("privileged", new Boolean(privileged)));
  +
               attribute = "override";
               String override = "false";
               try {
  
  
  
  1.15      +11 -0     jakarta-tomcat-4.0/webapps/admin/context/context.jsp
  
  Index: context.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/context/context.jsp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- context.jsp	14 Mar 2003 16:00:19 -0000	1.14
  +++ context.jsp	14 Jan 2005 23:30:32 -0000	1.15
  @@ -167,6 +167,17 @@
               </controls:data>
           </controls:row>
   
  +      <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="privileged">
  +            <controls:label><bean:message key="context.privileged"/>:</controls:label>
  +            <controls:data>
  +                <html:select property="privileged" styleId="privileged">
  +                     <bean:define id="booleanVals" name="contextForm" property="booleanVals"/>
  +                     <html:options collection="booleanVals" property="value"
  +                   labelProperty="label"/>
  +                </html:select>
  +            </controls:data>
  +        </controls:row>
  +
   <%-- input only allowed on create transaction --%>
          <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="path">
               <controls:label><bean:message key="context.path"/>:</controls:label>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message