You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Lipofsky <da...@bricsnet.com> on 2003/11/11 19:54:33 UTC

logging MessageResource requests by page

I am wanting to do some special logging
of MessageResource requests based on what
page the user makes the request from.

I looked at subclassing MessageResources
and MessageResourcesFactory - but it looks like
that won't work because in the MessageResources
class you don't have a way to access PageContext
or any info about the request object (please tell
me if you can think of a way).

However it looks like all the taglibs call
org.apache.struts.util.RequestUtils.message(...),
and they pass in the PageContext, so if I could
subclass that I could do my logging.  Unfortunately
it is mostly static methods, it looks like the
method calls would all be set at compile time,
with no chance to override.

I could of course modify every tablib class to call
a modified RequestUtils class, but I am looking for
something more elegant and less work.

Can anyone think of a solution?

(what I am really trying to is produce a list of
all keys used on a page - this will be used in a GUI tool
which lets a non-technical user fix mistranslated or 
untranslated strings they find on a page without having
to search the whole bundle)

Thanks,
Dan

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