How to concatenate 2 Strings with Java in HTML [closed]

0

I'm using the following input with 2 preset values.

<input type="text" class="read-only" value="${FORM.dataAgendamento + FORM.horaAgendamento}" readonly="readonly" size="40"/>

If they are integers, it works perfectly, however for strings I'm getting java.lang.NumberFormatException:

I wanted to know how to do this concatenation of strings in the same input.

    
asked by anonymous 01.09.2017 / 00:44

1 answer

2

In case you tried to add two objects that are not numbers. Try the following:

<input type="text" class="read-only" value="${FORM.dataAgendamento} ${FORM.horaAgendamento}" readonly="readonly" size="40"/>
    
05.09.2017 / 13:19