tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Checkoway <>
Subject Re: EL system properties...possible to override per context?
Date Tue, 05 Jul 2011 12:54:47 GMT
Thanks for the reply, Mark.  I realize tomcat is just conforming to the spec
(rightly so), but I happen to disagree with the spec (jsp/el, not tomcat) in
this one area.  Empty form fields being treated as "set to 0" is what I
consider buggy...since we're throwing the term "buggy" around.  :-)

"Run two Tomcat instances" is something I could do, but you have to admit
it's a brute force solution to a simple problem.

I see the same sort of suggestion got shot down about a year ago:

I understand wanting (insisting, for that matter) to isolate the EL parser
from the servlet API.  Seems to me it would be nice if there was a choice
- one EL parser is instantiated per engine (default behavior, parser shared
among all contexts)
- one EL parser is instantiated per context (and can be configured

The EL parser itself wouldn't have to know anything about the servlet
engine.  I believe the change would simply involve, for the most part,
eliminating static variables (such as the one in question,
AstValue.COERCE_TO_ZERO).  Moving those statics to an ELParserConfiguration
type object might be the ticket?

Is that a reasonable request?  What if I'm willing to help code it?  :-)


On Mon, Jul 4, 2011 at 4:04 PM, Mark Thomas <> wrote:

> On 04/07/2011 20:46, Dan Checkoway wrote:
> > I have two webapps that need to run under the same instance of tomcat.
>  One
> > needs COERCE_TO_ZERO=true, and the other needs COERCE_TO_ZERO=false.  By
> the
> > looks of it...
> >
> >
> >
> > ...I can only pick one behavior per tomcat instance.  Is there any way
> this
> > behavior could be controlled or overridden at the Context level instead
> of
> > system-wide?
> Short answer: no.
> Changing the source code to support this might be possible but given
> where the configuration value would be used and where it would be set
> there isn't an API available to pass the setting. That is going to make
> things very tricky if not impossible. If the code to do this is as ugly
> as I think it will be then the patch is likely to be vetoed anyway.
> Given that the app that requires COERCE_TO_ZERO=false is not
> specification compliant, does that give you any leverage to get the
> developers to fix their buggy code?
> I suspect the immediate answer is to run two Tomcat instances.
> Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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