You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Monika Koerdt <Mo...@centrify.com> on 2004/10/19 00:28:59 UTC

tomcat 4.1.30 vs. 5.0.2x

Hi -

 

I have the following piece of code running in Tomcat 5.0.2x

 

public class ContextValve extends ValveBase

{

            static ThreadLocal testContext = new ThreadLocal();

 

            public void invoke(Request request, Response response,
ValveContext context) throws IOException, ServletException

            {

                        testContext.set(request.getContext());

                        context.invokeNext(request, response);

            }

}

 

Seems to work properly on Tomcat 5.0.2x, but when compile it and run it
on 4.1.30, the returned context is always null.  Any ideas on why this
is happening?  I just need to get a hold of the context on every
request...

 

Thanks,

Monika

 


tomcat manager

Posted by kangkoong Kakoong <ka...@yahoo.com>.
I have compile my project with ant tool but when I see in tomcat manager, and I click my project name<ex.projex> its only display directory list, why not display index.htm, any one know why?

		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

Re: tomcat 4.1.30 vs. 5.0.2x

Posted by Bill Barker <wb...@wilshire.com>.
In TC 4.1.x, the Context isn't set until you are inside the Context in the 
pipeline.  It will only work on TC 4.1.x if your Valve is defined in the 
Context.

"Monika Koerdt" <Mo...@centrify.com> wrote in message 
news:D6DE73398967E54096684518594D99310AE626@exch-one.centrify.com...
Hi -



I have the following piece of code running in Tomcat 5.0.2x



public class ContextValve extends ValveBase

{

            static ThreadLocal testContext = new ThreadLocal();



            public void invoke(Request request, Response response,
ValveContext context) throws IOException, ServletException

            {

                        testContext.set(request.getContext());

                        context.invokeNext(request, response);

            }

}



Seems to work properly on Tomcat 5.0.2x, but when compile it and run it
on 4.1.30, the returned context is always null.  Any ideas on why this
is happening?  I just need to get a hold of the context on every
request...



Thanks,

Monika







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