You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Dave Levitt <da...@gmail.com> on 2014/01/21 17:15:45 UTC
Servlet 2.5 compatibility - Log4jServletContainerInitializer
I'm trying to add log4j 2.x to a Servlet 2.5 web app.
One goal is to also be able to deploy the artifact on a Servlet 3.x
container as the servers are migrated [from JBoss 5.x to 7].
When testing on JBoss 7.1, an exception is thrown from
Log4jServletContainerInitializer [line 49] as the servlet context gets the
major version [3.x] from the container instead of the 'effective' major
version [from the artifact's web.xml file].
The comment in the [2,0 RC1] onStartup method says "… For consistency
across all containers, if the effective Servlet major version of the
application is less than 3.0, this initializer does nothing."
So, should the code be invoking servletContainer.getEffectiveMajorVersion()
??
Re: Servlet 2.5 compatibility - Log4jServletContainerInitializer
Posted by Nick Williams <ni...@nicholaswilliams.net>.
This has been fixed as of RC1.
Thanks,
Nick
On Jan 21, 2014, at 10:47 AM, Dave Levitt wrote:
> Did a bit of research on Jira - this is issue
> LOG4J2-359<https://issues.apache.org/jira/browse/LOG4J2-359>
>
>
> On Tue, Jan 21, 2014 at 11:15 AM, Dave Levitt <da...@gmail.com> wrote:
>
>> I'm trying to add log4j 2.x to a Servlet 2.5 web app.
>>
>> One goal is to also be able to deploy the artifact on a Servlet 3.x
>> container as the servers are migrated [from JBoss 5.x to 7].
>>
>> When testing on JBoss 7.1, an exception is thrown from
>> Log4jServletContainerInitializer [line 49] as the servlet context gets the
>> major version [3.x] from the container instead of the 'effective' major
>> version [from the artifact's web.xml file].
>>
>> The comment in the [2,0 RC1] onStartup method says "… For consistency
>> across all containers, if the effective Servlet major version of the
>> application is less than 3.0, this initializer does nothing."
>>
>> So, should the code be invoking
>> servletContainer.getEffectiveMajorVersion() ??
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Servlet 2.5 compatibility - Log4jServletContainerInitializer
Posted by Dave Levitt <da...@gmail.com>.
Did a bit of research on Jira - this is issue
LOG4J2-359<https://issues.apache.org/jira/browse/LOG4J2-359>
On Tue, Jan 21, 2014 at 11:15 AM, Dave Levitt <da...@gmail.com> wrote:
> I'm trying to add log4j 2.x to a Servlet 2.5 web app.
>
> One goal is to also be able to deploy the artifact on a Servlet 3.x
> container as the servers are migrated [from JBoss 5.x to 7].
>
> When testing on JBoss 7.1, an exception is thrown from
> Log4jServletContainerInitializer [line 49] as the servlet context gets the
> major version [3.x] from the container instead of the 'effective' major
> version [from the artifact's web.xml file].
>
> The comment in the [2,0 RC1] onStartup method says "… For consistency
> across all containers, if the effective Servlet major version of the
> application is less than 3.0, this initializer does nothing."
>
> So, should the code be invoking
> servletContainer.getEffectiveMajorVersion() ??
>