Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 21093 invoked from network); 11 Feb 2000 16:12:54 -0000 Received: from www.jmonkey.com (199.198.219.210) by locus.apache.org with SMTP; 11 Feb 2000 16:12:54 -0000 Received: from bpappin (www [199.198.219.210]) by www.jmonkey.com (8.9.1b+Sun/8.9.3) with SMTP id MAA06650; Fri, 11 Feb 2000 12:17:53 GMT Message-ID: <005b01bf7480$ff867120$1f02010a@entrevision.com> From: "Brill Pappin" To: , "Arieh Markel" References: <200002111604.JAA18774@durango.Central.Sun.COM> Subject: Re: PATCH for context.WebXmlInterceptor, core.Context (was Re: login-config handling) Date: Fri, 11 Feb 2000 11:10:51 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 A CVS Novice question... how are the diff patches created? - Brill ----- Original Message ----- From: "Arieh Markel" To: Sent: Friday, February 11, 2000 4:04 PM Subject: PATCH for context.WebXmlInterceptor, core.Context (was Re: login-config handling) > > > Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm > > X-No-Archive: yes > > list-help: > > list-unsubscribe: > > list-post: > > Delivered-To: mailing list tomcat-dev@jakarta.apache.org > > From: costin@eng.sun.com > > To: tomcat-dev@jakarta.apache.org > > Subject: Re: login-config handling > > > > > > Also, I see that the Context class does not have a placeholder for the > > > > LoginConfiguration information. > > > > > > Yes. If it isn't working, the context doesn't know about it :-) > > > > I'll fix that tommorow, it's easy. > > > > Costin > > > > Here is the first part (my try of the initial incorporation into > WebXmlInterceptor, Context). > > Diffs are relative to 3.1M1. > > What's left is to develop the code that know what to do with it ;). > > Arieh > > =========================================================================== > --- > /home/amarkel/src/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.ja va > Fri Feb 11 08:59:17 2000 > +++ ./Context.java Thu Feb 10 17:47:19 2000 > @@ -63,6 +63,7 @@ > import org.apache.tomcat.server.*; > import org.apache.tomcat.context.*; > import org.apache.tomcat.util.*; > +import org.apache.tomcat.deployment.LoginConfiguration; > import java.io.*; > import java.net.*; > import java.util.*; > @@ -144,6 +145,7 @@ > private boolean isDistributable = false; > private MimeMap mimeTypes = new MimeMap(); > private int sessionTimeOut = -1; > + private LoginConfiguration loginConfig = null; > > // Maps specified in web.xml ( String->ServletWrapper ) > private Hashtable prefixMappedServlets = new Hashtable(); > @@ -1074,6 +1076,28 @@ > > public void addLibPath(String path) { > this.libPaths.addElement(path); > + } > + > + /** get the LoginConfiguration object associated with this context > + * > + * Based on Java Servlet Specification 2.2, chapter 13. > + * See login-config element. > + * > + * @return the LoginConfiguration associated. > + */ > + public LoginConfiguration getLoginConfiguration() { > + return loginConfig; > + } > + > + /** set the LoginConfiguration object associated with this context > + * > + * Based on Java Servlet Specification 2.2, chapter 13. > + * See login-config element. > + * > + * @param conf the LoginConfiguration to be associated with this context. > + */ > + public void setLoginConfiguration(LoginConfiguration conf) { > + loginConfig= conf; > } > > // XXX XXX XXX ugly, need rewrite ( servletLoader will call getClassPaths > and getLibPaths > =========================================================================== > --- > /home/amarkel/src/jakarta-tomcat/src/share/org/apache/tomcat/context/WebXmlI nter > ceptor.java Fri Feb 11 08:59:45 2000 > +++ ../context/WebXmlInterceptor.java Thu Feb 10 17:51:29 2000 > @@ -74,6 +74,7 @@ > * Will configure the context using the default web.xml > * > * @author costin@dnt.ro > + * @author arieh.markel@sun.com > */ > public class WebXmlInterceptor implements ContextInterceptor { > private static StringManager sm > =StringManager.getManager("org.apache.tomcat.core"); > @@ -158,6 +159,7 @@ > processWelcomeFiles(ctx, webDescriptor.getWelcomeFiles(), > internal); > processErrorPages(ctx, webDescriptor.getErrorPageDescriptors()); > + processLoginConfig(ctx, webDescriptor.getLoginConfiguration()); > } catch (Throwable e) { > String msg = "config parse: " + e.getMessage(); > > @@ -333,5 +335,15 @@ > } > } > > + /** handler for processing Login Configuration > + * > + * @param ctx the context for which we are updating the login config > + * @param cf the LoginConfiguration information that is to be associated > + * with the context passed > + */ > + private void processLoginConfig(Context ctx, LoginConfiguration cf) { > + if (null != cf) > + ctx.setLoginConfiguration(cf); > + } > > } > > > -- > Arieh Markel Sun Microsystems Inc. > Network Storage 500 Eldorado Blvd. MS UBRM11-194 > e-mail: arieh.markel@sun.COM Broomfield, CO 80021 > Let's go Panthers !!!! Phone: (303) 272-8547 x78547 > (e-mail me with subject SEND PUBLIC KEY to get public key) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org >