See AbstractAccessLogValve (which AccessLogValve overrides)
Then you could override AbstractAccessLogValve.createAccessLogElement()
which has
case 'q':
return new QueryElement();
To possible do doing something like
case 'q':
return new ObfuscatedQueryElemen
I want to obfuscate values of query params for certain URLs, however, I
would still like to log the request. Therefore, I cannot use the existing
conditionif/conditionunless attributes that AccessLogValve provides.
Sincerely,
Manak Bisht
On Fri, Jan 26, 2024 at 6:18 PM Mark Thomas wrote:
> On 2
On 26/01/2024 10:46, Manak Bisht wrote:
Hi,
I am trying to extend the AccessLogValve to modify logging behaviour for
certain URLs. However, I don't have access to the request object in the
AccessLogValve API. So, I am left with regex matching on the CharArrayWriter
message object. Is there a bett
My bad - AccessLogValve also supports that feature too
- *%{xxx}r* write value of ServletRequest attribute with name xxx (escaped
if required, value ?? if request is null)
https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Logging
-Tim
On Fri, Jan 26, 2024 at 7:23 AM Tim F
It depends on what you are trying to accomplish. ExtendedAccessLogValve is
a
little more flexible where you can write out arbitrary request
attributes but still format the request like the standard access
log. So you could have a filter set the value and not need to
write your own access logger.
-
Hi,
I am trying to extend the AccessLogValve to modify logging behaviour for
certain URLs. However, I don't have access to the request object in the
AccessLogValve API. So, I am left with regex matching on the CharArrayWriter
message object. Is there a better way to do this?
Sincerely,
Manak Bisht
I am using Tomcat 7.0 and need to pass some additional data to my JAAS login
module during authentication with standard FORM logins. By default using
the FORM login in the web application causes Tomcat to invoke the
FormAuthenticator valve which only passes username and password to the login
modu
Hey Chris,
Thanks a lot for the detailed reply. At the moment, I have written a class
that extends AccessLogValve.java.
I deactivated the AccessLogValve from the server.xml and element to your for this new Extended
Valve.(We wanted it at Engine level.)
Works completely fine!
Thanks for the clar
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sumit,
On 7/1/2009 4:02 AM, Sumit D wrote:
> - 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.
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
-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
> From: Sumit D [mailto:sumitd...@gmail.com]
> Subject: Re: Custom Valve
>
> by the way, I could not find META-INF/context.xml. I create from
> scratch ?
Yes, create it if you need one. Many webapps do not require the
Tomcat-specific settings available via a element.
>
how can I achieve this ?? I might be able to add some
> > code where it writes to logs, so that it will also write to some
> > object.
>
> What do you mean when you say "write some data in an object"?
>
> > But then I have no idea how to Deploy this custom va
t as well.
> Any pointers on how can I achieve this ?? I might be able to add some
> code where it writes to logs, so that it will also write to some
> object.
What do you mean when you say "write some data in an object"?
> But then I have no idea how to Deploy this custom
, so that
it will also write to some object. But then I have no idea how to Deploy
this custom valve.
Also, Valve Component specifies that the log "pattern" supports many things
like %h, %l, etc
but so far, i could not find how can I include all those(pattern codes) in
the log file.
Any
On Thu, Jun 18, 2009 at 3:28 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:
> > From: Bruce Edge [mailto:bruce.e...@gmail.com]
> > Subject: Custom valve, how to change role?
> >
> > ...or am I completely off in left field and should scrap
> > th
> From: Bruce Edge [mailto:bruce.e...@gmail.com]
> Subject: Custom valve, how to change role?
>
> ...or am I completely off in left field and should scrap
> this before someone gets hurt and just use securityfilter?
If you really insist on differentiating internal and external
In an attempt, possibly misguided, to try avoid using securityfilter, I'm
trying to write a valve to bypass the ssl authentication requirements of a
service based on remote host addr.
I've implemented a LocalValve that extends ValveBase and implements Valve.
Given that I must implement this:
I'm using Tomcat 6.0.14 and need to write a custom Valve to control the
Domain property of the JSESSIONID cookie (so it will be reused on any
subdomain) but I can't find any documentation on how to go about creating a
custom Valve.
Could someone please let me know if this is accurate?
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: Re: classpath problems with a custom valve
>
> What is confusing to me is why when i put my jar into
> server/lib, the web app doesn't also have access to
> classes loaded from there.
Look at the 5.
ote:
>
> > From: Steve Souza [mailto:[EMAIL PROTECTED]
> > Subject: Re: classpath problems with a custom valve
> >
> > It is still a bit mysterious and not ideal as installation
> > requires a class put in server/classes as well as the jar in
> > common/l
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: Re: classpath problems with a custom valve
>
> It is still a bit mysterious and not ideal as installation
> requires a class put in server/classes as well as the jar in
> common/lib, but it will do.
Using a valve is by n
TED]
> > Subject: Re: classpath problems with a custom valve
> >
> > I get the following exception which seems odd as I saw the missing
> class in
> > catalina.jar and I compiled against it.
>
> Java classloading hierarchy is not bidirectional - classes can see only
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: Re: classpath problems with a custom valve
>
> I get the following exception which seems odd as I saw the missing
class in
> catalina.jar and I compiled against it.
Java classloading hierarchy is not bidirectional - class
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
On 9/10/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>
> > From: Steve Souza [mailto:[EMAIL PROTECTED]
> > Subject: Re: classpath problems with a custom valve
> >
> > common/lib is for jars are only needed by web apps whereas
&
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: Re: classpath problems with a custom valve
>
> common/lib is for jars are only needed by web apps whereas
> shared/lib is for web apps AND tomcat.
Read the doc again - you have it backwards.
- Chuck
THIS COMMUNICAT
hen this classloader repositories are
relative to $CATALINA_BASE rather than $CATALINA_HOME.
On 9/10/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>
> > From: Steve Souza [mailto:[EMAIL PROTECTED]
> > Subject: Re: classpath problems with a custom valve
> >
> > based o
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: Re: classpath problems with a custom valve
>
> based on this document I placed my jar in server/lib as both
> web apps and tomcat need access to the classes in this jar.
What part of the Tomcat doc led you to that conclusi
org.apache.catalina.startup.Catalina start
On 9/10/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>
> > From: Steve Souza [mailto:[EMAIL PROTECTED]
> > Subject: classpath problems with a custom valve
> >
> > Shouldn't my war be able to see the classes from a jar
> >
> From: Steve Souza [mailto:[EMAIL PROTECTED]
> Subject: classpath problems with a custom valve
>
> Shouldn't my war be able to see the classes from a jar
> put into server/lib?
No - read the doc:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
You proba
I posted a question earlier, but now have some more info
I have a custom valve that monitors page accesses in tomcat. It works in
tomcat 6, and under tomcat 5.5 that comes bundled with jboss. I can not get
it to work in tomcat 5.5.25. I put the jar in server/lib and the war I
install that
- Original Message -
From: "Doug Black" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, July 25, 2007 9:58 PM
Subject: Re: Write custom valve?
Filip Hanik - Dev Lists hanik.com> writes:
take the source code of the RemoteAddrValve and start there.
Basical
er to not trigger the valve on the "protected" urls
Johnny Kewl kewlstuff.co.za> writes:
>
> Doug, I have never tried this, so as usual, I guessing here.
>
> I dont think you are going to come right with the standard valves, nor do I
> think you should try make a cust
Doug, I have never tried this, so as usual, I guessing here.
I dont think you are going to come right with the standard valves, nor do I
think you should try make a custom valve.
Rather look at filters, they not much more difficult to make than a normal
servlet, and you will find tons of stuff
and also through the user realm for the
context. Do I have to write a custom valve java class? How hard is this for an
intermediate Java writer? Any tips on how to do this?
take the source code of the RemoteAddrValve and start there.
Basically, in the valve is request.getPrincipal returns null
user realm for the
context. Do I have to write a custom valve java class? How hard is this for an
intermediate Java writer? Any tips on how to do this?
I apologize that I submitted essentially the same question a couple days ago,
but I got no responses so I thought I'd try with a less ve
36 matches
Mail list logo