You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ruben rubens <ar...@gmail.com> on 2009/02/12 13:43:40 UTC

Problem with lib version jasper-el.jar on tomcat 6.0.18

Hello,

I found a posible bug or weird performance with tomcat 6.0.18. I'm using
faces  for MVC, when the context is setting the values for bean atributes
from an empty input (input with null value) I don´t finally get a null value
as I expect, I finally get a primitive default value. For example, If I bind
my java.lang.Float to an input text and I do not fill any value in it, I get
a 0.0 value in my Float atribute, and I expected  null (like the original
value).

The libraries versions that I´m using are listed below:

      <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2_04</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2_04</version>
        </dependency>

In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect. I
think the problem is with this jar: jasper-el.jar.

Is there an explanation for these? In my opinion, I don´t think is a good
performance get a value from a form that nobody has put there.

Thanks in advance.

Re: Problem with lib version jasper-el.jar on tomcat 6.0.18

Posted by ruben rubens <ar...@gmail.com>.
Thanks Mark, you helped me!

2009/2/12 Mark Thomas <ma...@apache.org>

> ruben rubens wrote:
> > Hello,
> >
> > I found a posible bug or weird performance with tomcat 6.0.18. I'm using
> > faces  for MVC, when the context is setting the values for bean atributes
> > from an empty input (input with null value) I don´t finally get a null
> value
> > as I expect, I finally get a primitive default value. For example, If I
> bind
> > my java.lang.Float to an input text and I do not fill any value in it, I
> get
> > a 0.0 value in my Float atribute, and I expected  null (like the original
> > value).
> >
> > The libraries versions that I´m using are listed below:
> >
> >       <dependency>
> >             <groupId>javax.faces</groupId>
> >             <artifactId>jsf-api</artifactId>
> >             <version>1.2_04</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>javax.faces</groupId>
> >             <artifactId>jsf-impl</artifactId>
> >             <version>1.2_04</version>
> >         </dependency>
> >
> > In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect.
> I
> > think the problem is with this jar: jasper-el.jar.
> >
> > Is there an explanation for these? In my opinion, I don´t think is a good
> > performance get a value from a form that nobody has put there.
>
> That behaviour is required by the EL spec (It was a bug that was fixed.).
> You
> can disable the spec compliant behaviour by using
> org.apache.el.parser.COERCE_TO_ZERO=false
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Problem with lib version jasper-el.jar on tomcat 6.0.18

Posted by Mark Thomas <ma...@apache.org>.
ruben rubens wrote:
> Hello,
> 
> I found a posible bug or weird performance with tomcat 6.0.18. I'm using
> faces  for MVC, when the context is setting the values for bean atributes
> from an empty input (input with null value) I don´t finally get a null value
> as I expect, I finally get a primitive default value. For example, If I bind
> my java.lang.Float to an input text and I do not fill any value in it, I get
> a 0.0 value in my Float atribute, and I expected  null (like the original
> value).
> 
> The libraries versions that I´m using are listed below:
> 
>       <dependency>
>             <groupId>javax.faces</groupId>
>             <artifactId>jsf-api</artifactId>
>             <version>1.2_04</version>
>         </dependency>
>         <dependency>
>             <groupId>javax.faces</groupId>
>             <artifactId>jsf-impl</artifactId>
>             <version>1.2_04</version>
>         </dependency>
> 
> In tomcat 6.0.13 I´m not getting the same behaivour. I get that I expect. I
> think the problem is with this jar: jasper-el.jar.
> 
> Is there an explanation for these? In my opinion, I don´t think is a good
> performance get a value from a form that nobody has put there.

That behaviour is required by the EL spec (It was a bug that was fixed.). You
can disable the spec compliant behaviour by using
org.apache.el.parser.COERCE_TO_ZERO=false

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org