Good day!

I have a map in Bina, from which I need to output certain values ​​by key to the jsp-page.

<jsp:useBean id="user" class="bean.UserLoginBean" scope="session"/> <p><font size=2 color=red><c:out value="${errors['login']}"/></font></p> 

In this case, the key is login.

My Map:

 Map<String, String> errors = new HashMap<String, String>(); 

Actually the question itself is how to derive the value from the map by key to the jsp-page using jstl?

  • ключ - login - Key in the login variable, or key - string "login"? - Pavel Krizhanovskiy
  • key - string login - Roman

1 answer 1

Looks like you mistakenly used single quotes instead of double quotes.

 <p><font size=2 color=red><c:out value="${errors["login"]}"/></font></p> 
  • if you use paired quotes, then writes multiple annotations and crashes JasperException - Roman