title: Can't add s:property values together in jsp
body: <p>Нello,</p>
  
  <p>I am programming in a jsp environment, where I need to do the following:
  <br>In an iterator inside an &lt; s:if> I have to make a query, that takes a value from one input field and subtracts it with another value from another input field and sets this to a variable, then does the same, but it adds the second value this time, and sets the result to a second variable, and in the end passes both results to the query. The subtraction works, but instead of addition, it just appends the value of the 2nd input field to the value of the first, when setting the second variable. How can I resolve this in s:property? I tried using &lt; s:property value="${"(...)first"+"(...)second"}"/>, but it gives me an error, that it doesn't support runtime expressions. Code:</p>
  
  <pre><code>    &lt;s:set name="thequery"&gt;
          &lt;s:iterator value="#attr.var" status="status"&gt;
              &lt;%--(...)other unrelevant code--%&gt;
              &lt;s:if test="#attr.xinput3[#status.index] != 0"&gt;
                  &lt;%--the one below works fine--&gt;
                  &lt;s:set name="around1"&gt;
                          &lt;s:property value="#attr.xinput[#status.index]-#attr.xinput3[#status.index]" /&gt;
                  &lt;/s:set&gt;
                  &lt;%--this one just appends the value of xinput3[] to the value of xinput[], instead of adding them--&gt;
                  &lt;s:set name="around2"&gt;
                          &lt;s:property value="#attr.xinput[#status.index]+#attr.xinput3[#status.index]" /&gt;
                  &lt;/s:set&gt;
                  &lt;s:property value="#attr.xvar[#status.index]" /&gt;=&lt;s:property
                          value="around1" /&gt;!&lt;s:property value="around2" /&gt;;&lt;/s:if&gt;
              &lt;s:else&gt;
                              &lt;%--unrelevant code--%&gt;
              &lt;/s:else&gt;
          &lt;/s:iterator&gt;
      &lt;/s:set&gt;
  </code></pre>
  
  <p>The result: for, say, xinput[] = 12 and xinput3[] = 2:</p>
  
  <blockquote>
    <p>10!122;</p>
  </blockquote>
  
  <p>While I need it to be</p>
  
  <blockquote>
    <p>10!14;</p>
  </blockquote>
  
  <p>How can I fix this?</p>