You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Costin Manolache <co...@eng.sun.com> on 2000/06/22 19:06:59 UTC

Re: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session StandardSession.java

Probably mine - and I still have few more :-(

I'll make sure all tests are fine after I finish.  I think this one is result
of DefaultServlet
 rewrite.

Costin

Paul Lamb wrote:

> I'm feeling really lame right now, I just realized when I got your reply
> that this was a catalina change and not a tomcat one. This makes much more
> sense. This is a good thing.
>
> Now if I can just figure out which tomcat change from last night broke
> contexts where the path=""...
>
> Paul
> >
> >
> > Paul Lamb wrote:
> >
> > > >   Provide a place for an Authenticator to stash the
> > > > authenticated Principal
> > > >   (returned from the corresponding Realm) that is
> > associated with this
> > > >   request.  Authenticators that take advantage of this can
> > > > optimize their
> > > >   performance by avoiding potentially expensive
> > > > Realm.authenticate() calls
> > > >   on every single request.
> > > >
> > >
> > > Should getUserPrincipal() also first check for the
> > Principal in the session
> > > first before returning null or creating the SimplePrincipal?
> > >
> >
> > The way I actually implemented it was that the authenticator
> > itself makes this
> > decision (before the request ever gets to the servlet where
> > it can call
> > getUserPrincipal()).  The request object itself has no clue
> > that any of this
> > magic is going on behind the scenes -- all it knows is that
> > some Tomcat
> > component either did, or did not, call setUserPrincipal() to
> > provide a value to
> > be returned by getUserPrincipal().
> >
> > This update was implemented on a subsequent check-in last
> > night for the BASIC
> > and DIGEST authenticators.
> >
> > >
> > > Paul Lamb
> > >
> >
> > Craig McClanahan
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session StandardSession.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/22/2000 2:04 PM, "Alex Chaffee" <gu...@edamame.stinky.com> wrote:

> OK. I'm still fixing bugs, btw. :-( Don't want to check in until it
> all works.  I guess that'll mean another fairly large checkin --
> sorry, jon.

no, i don't care about large checkins of single files, but when it spans
multiple files and multiple bugs, it would be nice if those were separated
into different checkins.

essentially it comes down to not being able to tell which changes in the
Log: are associated to the diffs of the code.

-jon


Re: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session StandardSession.java

Posted by Alex Chaffee <gu...@edamame.stinky.com>.
On Thu, Jun 22, 2000 at 12:58:42PM -0700, Costin Manolache wrote:
> > Yup.  I've already fixed two problems in Context -- here's the diff --
> > should I check it in or just let you keep hacking?
> 
> Sure, check it in !

OK. I'm still fixing bugs, btw. :-( Don't want to check in until it
all works.  I guess that'll mean another fairly large checkin --
sorry, jon.


-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Re: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session StandardSession.java

Posted by Costin Manolache <co...@eng.sun.com>.
> Yup.  I've already fixed two problems in Context -- here's the diff --
> should I check it in or just let you keep hacking?

Sure, check it in !

I guess I'm done with most of the changes, now I'll just try to fix bugs and make sure
the tests are ok.

Costin

> ============================================================
> RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
> retrieving revision 1.97
> diff -u -r1.97 Context.java
> --- Context.java        2000/06/22 00:15:00     1.97
> +++ Context.java        2000/06/22 18:58:04
> @@ -527,7 +527,7 @@
>             // Workaround for frequent "bug" in web.xmls
>             // Declare a default mapping
>             log("Mapping with unregistered servlet " + servletName );
> -           addServlet( servletName, servletName );
> +           sw = addServlet( servletName, servletName );
>         }
>         if( "/".equals(path) )
>             defaultServlet = sw;
> @@ -714,8 +714,6 @@
>         if (firstLog == true) {
>             csLog = Logger.getLogger("servlet_log");
>             if( csLog!= null ) {
> -               csLog.setCustomOutput("true");
> -               csLog.setVerbosityLevel(Logger.INFORMATION);
>                 firstLog = false;
>             }
>         }
>
> Index: admin/WEB-INF/classes/ContextAdmin.java
> ===================================================================
> RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/ContextAdmin.java,v
> retrieving revision 1.3
> diff -u -r1.3 ContextAdmin.java
> --- admin/WEB-INF/classes/ContextAdmin.java     2000/05/24 01:58:10     1.3
> +++ admin/WEB-INF/classes/ContextAdmin.java     2000/06/22 18:59:22
> @@ -83,9 +83,6 @@
>             v.addElement("ATTRIBUTE: " + RequestUtil.URLDecode(context.getAttribute(key).toString()));
>         }
>
> -       if (context.getDefaultServlet() != null)
> -           v.addElement("DEFAULT SERVLET NAME: " + context.getDefaultServlet().getServletName());
> -
>         v.addElement("SERVER INFO: " + context.getEngineHeader());
>
>         String[] s = new String[v.size()];
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/session StandardSession.java

Posted by Alex Chaffee <gu...@edamame.stinky.com>.
> Paul Lamb wrote:
> 
> > I'm feeling really lame right now, I just realized when I got your reply
> > that this was a catalina change and not a tomcat one. This makes much more
> > sense. This is a good thing.
> >
> > Now if I can just figure out which tomcat change from last night broke
> > contexts where the path=""...


On Thu, Jun 22, 2000 at 10:06:59AM -0700, Costin Manolache wrote:
> Probably mine - and I still have few more :-(
> 
> I'll make sure all tests are fine after I finish.  I think this one is result
> of DefaultServlet
>  rewrite.

Yup.  I've already fixed two problems in Context -- here's the diff --
should I check it in or just let you keep hacking?

The first fixes a nullpointer crash (the sw variable was null and we
tried to add it to a hashtable), the second fixes a compiler error,
since src/admin/WEB-INF/classes/ContextAdmin.java calls
getDefaultServlet.


Index: Context.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
retrieving revision 1.97
diff -u -r1.97 Context.java
--- Context.java	2000/06/22 00:15:00	1.97
+++ Context.java	2000/06/22 18:58:04
@@ -527,7 +527,7 @@
 	    // Workaround for frequent "bug" in web.xmls
 	    // Declare a default mapping
 	    log("Mapping with unregistered servlet " + servletName );
-	    addServlet( servletName, servletName );
+	    sw = addServlet( servletName, servletName );
 	}
 	if( "/".equals(path) )
 	    defaultServlet = sw;
@@ -714,8 +714,6 @@
 	if (firstLog == true) {
 	    csLog = Logger.getLogger("servlet_log");
 	    if( csLog!= null ) {
-		csLog.setCustomOutput("true");
-		csLog.setVerbosityLevel(Logger.INFORMATION);
 		firstLog = false;
 	    }
 	}

Index: admin/WEB-INF/classes/ContextAdmin.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/ContextAdmin.java,v
retrieving revision 1.3
diff -u -r1.3 ContextAdmin.java
--- admin/WEB-INF/classes/ContextAdmin.java	2000/05/24 01:58:10	1.3
+++ admin/WEB-INF/classes/ContextAdmin.java	2000/06/22 18:59:22
@@ -83,9 +83,6 @@
 	    v.addElement("ATTRIBUTE: " + RequestUtil.URLDecode(context.getAttribute(key).toString()));
 	}
 
-	if (context.getDefaultServlet() != null)
-	    v.addElement("DEFAULT SERVLET NAME: " + context.getDefaultServlet().getServletName());
-
 	v.addElement("SERVER INFO: " + context.getEngineHeader());
 
 	String[] s = new String[v.size()];