Skip to main content

[webtier] webcontainer.invalidProperty is logged too often

1 reply [Last post]
Anonymous

The warning "webcontainer.invalidProperty" is logged in several places.
Two of these deal with property elements below element.

The first is in WarHandler which logs this message for nearly all valid
properties. Actually I do not know why it is logged in WarHandler at all
- given that WebModule is treating properties anyway.

WebModule nevertheless also has a flaw in that it logs this message for
the valid elements starting with "valve_" or "listener_".

To reduce log messages to those elements that really are invalid I
propose the attached patch. If this is reviewed positively I will commit it.

--
Wolfram Rittmeyer

Index: war-util/src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java
===================================================================
--- war-util/src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java (revision 25174)
+++ war-util/src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java (working copy)
@@ -335,12 +335,6 @@
useBundledJSF = Boolean.valueOf(value);
} else if("useBundledJsf".equalsIgnoreCase(propName)) {
useBundledJSF = Boolean.valueOf(value);
- } else {
- Object[] params = { propName, value };
- if (logger.isLoggable(Level.WARNING)) {
- logger.log(Level.WARNING, "webcontainer.invalidProperty",
- params);
- }
}
} else {
skipSubTree(name);
Index: web-glue/src/main/java/com/sun/enterprise/web/WebModule.java
===================================================================
--- web-glue/src/main/java/com/sun/enterprise/web/WebModule.java (revision 25174)
+++ web-glue/src/main/java/com/sun/enterprise/web/WebModule.java (working copy)
@@ -1342,6 +1342,10 @@
setUseMyFaces(ConfigBeansUtilities.toBoolean(value));
} else if(name.startsWith("alternatedocroot_")) {
parseAlternateDocBase(name, value);
+ } else if(name.startsWith("valve_") ||
+ name.startsWith("listener_")) {
+ // do nothing; these properties are dealt with
+ // in configureCatalinaProperties()
} else {
Object[] params = {name, value};
logger.log(Level.WARNING, "webcontainer.invalidProperty",

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

On 03/ 6/09 02:00 PM, Wolfram Rittmeyer wrote:
> The warning "webcontainer.invalidProperty" is logged in several
> places. Two of these deal with property elements below
> sun-web-app> element.
>
> The first is in WarHandler which logs this message for nearly all
> valid properties. Actually I do not know why it is logged in
> WarHandler at all - given that WebModule is treating properties anyway.
>
> WebModule nevertheless also has a flaw in that it logs this message
> for the valid elements starting with "valve_" or "listener_".
>
> To reduce log messages to those elements that really are invalid I
> propose the attached patch. If this is reviewed positively I will
> commit it.

Thanks, Wolfram!

Please go ahead with your commit.

Jan

>
>
> --
> Wolfram Rittmeyer
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net

[att1.html]