You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Glenn Nielsen <gl...@voyager.apg.more.net> on 2002/02/11 16:26:34 UTC

[PROPOSAL] commons-filters

The Servlet 2.3 spec adds the ability to configure servlet filters.
Would the commons be a place where servlet filters could be created
and shared between different projects?

We (Rich Catlett and I) have a servlet filter which handles file uploads
by creating a ServletRequestWrapper.  This could be the first filter in
the commons-filters area.

Regards,

Glenn

----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

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


Re: [PROPOSAL] commons-filters

Posted by Remy Maucherat <re...@apache.org>.
> The Servlet 2.3 spec adds the ability to configure servlet filters.
> Would the commons be a place where servlet filters could be created
> and shared between different projects?
> 
> We (Rich Catlett and I) have a servlet filter which handles file uploads
> by creating a ServletRequestWrapper.  This could be the first filter in
> the commons-filters area.

+1. Good idea.

Remy


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


Re: [PROPOSAL] commons-filters

Posted by Serge Knystautas <se...@lokitech.com>.
I'd be happy to contribute a number of filters we use....

- PerformanceFilter (outputs generation time and lots of other information
over whatever requests it filters)
- JTidyFilter (uses JTidy to clean up the HTML output and dumps the error
messages at the bottom of the page)
- RequiresSecureFilter (if request is insecure, invalidates session and
redirects to https)
- SynchronizationFilter (ugggly hack... synchronizes everything so only 1
request is handled at a time by anything this filter covers)
- ReferrerFilter (simple filter that emails you when someone has
clicked-through to your site from somewhere outside the excludes
list...could be extended to allow custom actions)
- GZipFilter (fitler equivalent of mod_gzip)

I probably have a few others lying around...

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Glenn Nielsen" <gl...@voyager.apg.more.net>
To: <co...@jakarta.apache.org>
Sent: Monday, February 11, 2002 10:26 AM
Subject: [PROPOSAL] commons-filters


> The Servlet 2.3 spec adds the ability to configure servlet filters.
> Would the commons be a place where servlet filters could be created
> and shared between different projects?
>
> We (Rich Catlett and I) have a servlet filter which handles file uploads
> by creating a ServletRequestWrapper.  This could be the first filter in
> the commons-filters area.
>
> Regards,
>
> Glenn
>
> ----------------------------------------------------------------------
> Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------



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


Re: "dependant" Cache Filter (was [PROPOSAL] commons-filters)

Posted by ba...@generationjava.com.

On Tue, 12 Feb 2002, Lavandowska wrote:

> Interesting idea.  Do you have suggestions on how such an organization
> would be configured?  Sounds rather messy to be specifying these
> "relationships" in web.xml.

Yeah, I've not investigated how you'd specify the dependencies. Maybe the
web.xml would specify a url to find that config xml at or something. Are
there any general patterns for adding new xml config's?

Could a simple rules engine fit?

>
> > This could then be tied with a servlet that did redirection in a
> > configurable way, so that a request could be sent off to another
> > site. It
>
> I don't follow this part, why send it off to another site?

Well, this part of the idea was a follow-on one. It gets into manual
load-balancing a touch, but what if I setup a handful of cache machines,
and then had one real tomcat. I could use the real tomcat for internal
stuff or something, and have all the users hitting the cache machines.

The cache-filter would start to get up into being a web-cache server. So
possibly a bit too far in the future, but the idea seems valid. I'm not
sure if things like squid and the like allow you to build dependency
trees.

Would be interesting to make the dependency concept dynamic, so that
database code/triggers could inform the right webpage etc. I don't know if
that would be considered ugly.

I'm wandering :)

Bay


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


Re: "dependant" Cache Filter (was [PROPOSAL] commons-filters)

Posted by Lavandowska <fl...@yahoo.com>.
--- bayard@generationjava.com wrote:
> Hey Lance,
<snip>
> ie) readPlant.jsp and readAllPlants.jsp would depend on
> writePlant.jsp. If
> the cache saw a request for writePlant.jsp, it would invalidate
> readPlant.jsp and readAllPlants.jsp. etc etc.

Interesting idea.  Do you have suggestions on how such an organization
would be configured?  Sounds rather messy to be specifying these
"relationships" in web.xml.

> This could then be tied with a servlet that did redirection in a
> configurable way, so that a request could be sent off to another
> site. It

I don't follow this part, why send it off to another site?

Lance

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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


Re: [PROPOSAL] commons-filters

Posted by ba...@generationjava.com.
Hey Lance,

I was discussing the idea of a CacheFilter the other day with the local
JUG. One idea we came up with was for a configuration of dependencies.

ie) readPlant.jsp and readAllPlants.jsp would depend on writePlant.jsp. If
the cache saw a request for writePlant.jsp, it would invalidate
readPlant.jsp and readAllPlants.jsp. etc etc.

This could then be tied with a servlet that did redirection in a
configurable way, so that a request could be sent off to another site. It
would allow you to create a Cache server on top of your application
server, provided the only changes to the db were happening through the
website :)

Anyway, just an idea.

Bay

On Mon, 11 Feb 2002, Lavandowska wrote:

> CacheFilter - uses Cache from commons-sandbox to cache response byte
> arrays.  Configure which directories to *not* cache.  Currently in
> rough state.


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


Re: [PROPOSAL] commons-filters

Posted by Lavandowska <fl...@yahoo.com>.
I have two filters that I would be interested in donating:

WorkingFilter - displays "Upgrade in Process" message to anyone
accessing a url from outside of a configured set of IP addresses.  Not
sure how widely useful this is, but this allows us to update our code
and make configuration changes through admin apps without concern for
users.  The "allowed IPs" lets us operate on the site while it is
unavailable to visitors.

CacheFilter - uses Cache from commons-sandbox to cache response byte
arrays.  Configure which directories to *not* cache.  Currently in
rough state.

--- Glenn Nielsen <gl...@voyager.apg.more.net> wrote:
> The Servlet 2.3 spec adds the ability to configure servlet filters.
> Would the commons be a place where servlet filters could be created
> and shared between different projects?


=====
Lance Lavandowska
Http://www.brainopolis.com/

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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


Re: [PROPOSAL] commons-filters

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 11 Feb 2002, Glenn Nielsen wrote:

> Date: Mon, 11 Feb 2002 10:15:00 -0600
> From: Glenn Nielsen <gl...@voyager.apg.more.net>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: [PROPOSAL] commons-filters
>
> "Craig R. McClanahan" wrote:
> >
> > On Mon, 11 Feb 2002, Glenn Nielsen wrote:
> >
> > > Date: Mon, 11 Feb 2002 09:26:34 -0600
> > > From: Glenn Nielsen <gl...@voyager.apg.more.net>
> > > Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > > To: commons-dev@jakarta.apache.org
> > > Subject: [PROPOSAL] commons-filters
> > >
> > > The Servlet 2.3 spec adds the ability to configure servlet filters.
> > > Would the commons be a place where servlet filters could be created
> > > and shared between different projects?
> > >
> > > We (Rich Catlett and I) have a servlet filter which handles file uploads
> > > by creating a ServletRequestWrapper.  This could be the first filter in
> > > the commons-filters area.
> > >
> >
> > +1 on the general concept.  However, over time, I think it might need to
> > be sets of topically related filters.  We could easily start with a
> > commons-filters package that gets them all, and split out later as needed.
> > That's sort of the philosophy behind commons-util -- grab small one-class
> > goodies and package them up until there's enough related stuff to spin off
> > into its own package.
> >
>
> Right, it may end up being patterned after the Jakarta-Taglibs build.
> One project (commons area) but with 1..N filters or sets of filters in
> little sub projects.
>
> > You and Rich are both Jakarta committers, so we can grant you commit
> > access to jakarta-commons-sandbox to get this started.
> >
>
> Great!  Let me know when we have the karma.
>

Done.

> > Go ahead and sign me up as an initial contributor, if you want, as well.
> >
>
> Of course!
>

Craig


> ----------------------------------------------------------------------
> Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
> MOREnet System Programming               |  * if iz ina coment.      |
> Missouri Research and Education Network  |  */                       |
> ----------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


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


Re: [PROPOSAL] commons-filters

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
"Craig R. McClanahan" wrote:
> 
> On Mon, 11 Feb 2002, Glenn Nielsen wrote:
> 
> > Date: Mon, 11 Feb 2002 09:26:34 -0600
> > From: Glenn Nielsen <gl...@voyager.apg.more.net>
> > Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > To: commons-dev@jakarta.apache.org
> > Subject: [PROPOSAL] commons-filters
> >
> > The Servlet 2.3 spec adds the ability to configure servlet filters.
> > Would the commons be a place where servlet filters could be created
> > and shared between different projects?
> >
> > We (Rich Catlett and I) have a servlet filter which handles file uploads
> > by creating a ServletRequestWrapper.  This could be the first filter in
> > the commons-filters area.
> >
> 
> +1 on the general concept.  However, over time, I think it might need to
> be sets of topically related filters.  We could easily start with a
> commons-filters package that gets them all, and split out later as needed.
> That's sort of the philosophy behind commons-util -- grab small one-class
> goodies and package them up until there's enough related stuff to spin off
> into its own package.
> 

Right, it may end up being patterned after the Jakarta-Taglibs build.  
One project (commons area) but with 1..N filters or sets of filters in 
little sub projects.

> You and Rich are both Jakarta committers, so we can grant you commit
> access to jakarta-commons-sandbox to get this started.
> 

Great!  Let me know when we have the karma.

> Go ahead and sign me up as an initial contributor, if you want, as well.
>

Of course!
 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

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


Re: [PROPOSAL] commons-filters

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 11 Feb 2002, Glenn Nielsen wrote:

> Date: Mon, 11 Feb 2002 09:26:34 -0600
> From: Glenn Nielsen <gl...@voyager.apg.more.net>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org
> Subject: [PROPOSAL] commons-filters
>
> The Servlet 2.3 spec adds the ability to configure servlet filters.
> Would the commons be a place where servlet filters could be created
> and shared between different projects?
>
> We (Rich Catlett and I) have a servlet filter which handles file uploads
> by creating a ServletRequestWrapper.  This could be the first filter in
> the commons-filters area.
>

+1 on the general concept.  However, over time, I think it might need to
be sets of topically related filters.  We could easily start with a
commons-filters package that gets them all, and split out later as needed.
That's sort of the philosophy behind commons-util -- grab small one-class
goodies and package them up until there's enough related stuff to spin off
into its own package.

You and Rich are both Jakarta committers, so we can grant you commit
access to jakarta-commons-sandbox to get this started.

Go ahead and sign me up as an initial contributor, if you want, as well.

> Regards,
>
> Glenn

Craig


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