tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumit D <sumitd...@gmail.com>
Subject Re: Custom Valve
Date Wed, 01 Jul 2009 08:02:25 GMT
Thank you Chris and Chuck for your replies.
I tried to write a Custom Valve but please correct me if I am wrong:
when writing a custom valve,
- Extend the ValveBase class, Implement LifeCycle (not obligatory)
- write invoke method implementation
- compile and create its .jar file and put it in Catalina_Home/lib
- point it using the context.xml or server.xml (depending on the choice at
what lever to implement the Valve)

Please correct me if anythings going wrong here.

@ Chris, Sorry but i dont quite understand what you meant by "Many of us get
paid for our software work..."
If you could give more pointers, that would be great. Since I am on short
internship, I can try out a lot of things
Or if you can give me a really basic idea to write a very basic Valve , that
would be great.
I will keep you updated if anything works out...

Thank you so much,

Cheers

Sumit

On Fri, Jun 26, 2009 at 3:39 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sumit,
>
> On 6/25/2009 7:42 AM, Sumit D wrote:
> > *By "write some data in an object" I wanted to say that, when the logs
> are
> > written, *
> > *then and there I would like to have the same information encapsulated in
> an
> > object*
> > because we need to send it to our framework.
> >
> > Another option would be analyzing
> > the logs and extracting the info. But I thought it might be a bit easier
> to
> > get it in
> > some object.
>
> Okay. So, define some object that meets your needs, and write the log
> message not only to the log file, but also "to" your object (whatever
> that means: queuing a string, etc.). Stick the object in either the
> request (if the scope of this info ought to be the request) or stick it
> in the ServletContext.
>
> Do you want us to give you some ideas? This sounds like it's pretty
> straightforward. Many of us get paid for our software work...
>
> See Chuck's responses re:context.xml and <Valve> configuration.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkpEz6oACgkQ9CaO5/Lv0PCEXgCglFVsnckUCkzBDpMDrlOFXH5t
> KPgAn1TSPNC+TohJ/uqgEWEabBQKEbw0
> =pa7F
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message