You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thiru Panyala <th...@hds.com> on 2002/11/07 02:42:53 UTC

RE: Can a filter handle all the apps in a container?

Thank you Bush for responding quickly.

To better explain why I came up with this question, see the attachment. (The
attachment is a Coldfusion template served by the Coldfusion application
server when the debugging is ON). I want to achieve the kind of scenario
with the servlet container irrespective of the application is being served
and how the logging for the application is configured (commons
logging/Log4J).
As the different apps might be configured to log the debug info (specific to
the request), I am looking for a centralized control from which I can enable
or disable the showing of debug info to the users (possibly using a filter
or any other technique) as shown in attachment. 

Thanx
Thirupati Panyala

-----Original Message-----
From: Eddie Bush [mailto:ekbush@swbell.net]
Sent: Wednesday, November 06, 2002 6:29 PM
To: Struts Users Mailing List
Subject: Re: Can a filter handle all the apps in a container?


Thiru Panyala wrote:

>Hi,
>
>I have a simple (stupid?) question.
>Can I configure a Servlet filter to intercept requests to all the
>applications (a.k.a all the ServletContexts)? All I know is we can
configure
>a filter for each ServletContext (application), but I am wondering if there
>is any way.
>
You setup filters in web.xml - you could configure the filter for every 
app; you'd do it one app at a time.  Would it be the same instance?  Now 
there's a good question ... Craig?

>The reason I am asking is because, if there is a way to do so, I can
>configure my filter to provide me the debug output (Such as CGI, session,
>request, and ServletContext variables) on all the applications on
>development servers and I can get rid of debugging on production servers
(by
>not deploying the filter).
>
I think I'm not understanding.  See commons-logging for controlling 
logging output.  commons-logging + (jdk1.4 logging | log4j) = 
easily-managed debug output.

>Thanx in advance,
>Thirupati Panyala
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



Re: Can a filter handle all the apps in a container?

Posted by Eddie Bush <ek...@swbell.net>.
No can do compadre - at least, I don't think you can.  This is a J2EE thing.

I ... think you could benefit from reviewing the servlet specification 
(v2.3).  In additon, you should be aware that filters deal with 
processing HTTP requests and responses to and from JAVA resources... 
servlets.  I ... really don't think you could use one for what your 
proposing, but I'll let someone else make that call.  I'm not as 
familiar with the specification as I should be.

Thiru Panyala wrote:

>Thank you Bush for responding quickly.
>
>To better explain why I came up with this question, see the attachment. (The
>attachment is a Coldfusion template served by the Coldfusion application
>server when the debugging is ON). I want to achieve the kind of scenario
>with the servlet container irrespective of the application is being served
>and how the logging for the application is configured (commons
>logging/Log4J).
>As the different apps might be configured to log the debug info (specific to
>the request), I am looking for a centralized control from which I can enable
>or disable the showing of debug info to the users (possibly using a filter
>or any other technique) as shown in attachment. 
>
>Thanx
>Thirupati Panyala
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>