struts2 - struts 2 doesnt do division when value is a double? -


In Struts 2, I have a very strange scenario.

When I do the following:

  & lt; S: property value = "% {4/2}" />  

I get 2.

But when I do the following:

  & lt; S: property value = "% {2/4}" />  

I get a bigger fat 0.

Property tags always output to an integer, whenever the evaluation value is double. How can I change it?

You are making arithmetic integers because your input is integers, not pairs: zero to integer Two split is Zero try it out:

   instead  

.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -