1

i've been trying to display some data from java servlet into a jsp fields like this:

<td align="right"> Employee Email: </td>
 <td> <input type="text" name="emp_email" value="${empMail}"> </td>
 </tr>

However, once i want to read back any value from the input fields in the table, i get NULL, and i think its because of the "value="${empMail}"" part, so using a boolean variable in the logic side of my code. Im trying to implement this in every input field of the table:

<tr>
 <td align="right"> Employee Name: </td>
 <td> <input type="text" name="emp_name" ${inputSwitcher eq 0  ? 'value="${empName}"' : ''}>  </td>
 </tr>

so, whenever i want to display a value, i switch [inputSwitcher] to 0, and whenever i want to read the value, i switch it to 1. But this nested (EL) expression is not working and all i get when i want to display the employee name is a field writen with ${empName} literally.

¿How can i properly make use of nested EL in a expression like this?

Clown
  • 183
  • 1
  • 10
  • Does this answer your question? [How to nest an EL expression in another EL expression](https://stackoverflow.com/questions/15592614/how-to-nest-an-el-expression-in-another-el-expression) – Jasper de Vries Dec 10 '20 at 14:31
  • See also https://stackoverflow.com/questions/6297262/how-to-concatenate-a-string-in-el – Jasper de Vries Dec 10 '20 at 14:43

0 Answers0