title: Problem with showing message from model in view in Spring-MVC with (JSP+JSTL)
body: <p>I'm learning spring-mvc now, and I have problem with getting messages from model and showing there in my .jsp views.</p>
  <p>Who can explain why my code does't work?</p>
  <p>This is my pom.xml:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
     &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
     &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
     &lt;version&gt;3.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
     &lt;artifactId&gt;javax.servlet.jsp-api&lt;/artifactId&gt;
     &lt;version&gt;2.3.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl --&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;jstl&lt;/groupId&gt;
     &lt;artifactId&gt;jstl&lt;/artifactId&gt;
     &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>My controller:</p>
  <pre class="lang-java prettyprint-override"><code>@Controller
  public class SpittleController {
  
      private MessagesDao messagesDao;
  
      @Autowired
      public SpittleController(MessagesDao messagesDao) {
          this.messagesDao = messagesDao;
      }
      @RequestMapping(value = &quot;/spittles&quot;, method = RequestMethod.GET)
      public String spittles(Model model) {
          model.addAttribute(&quot;message&quot;, messagesDao.showMessage());
          return &quot;spittles&quot;;
      }
  }
  </code></pre>
  <p>And my view:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;%@ page contentType=&quot;text/html;charset=UTF-8&quot; language=&quot;java&quot; %&gt;
  &lt;%@ taglib uri=&quot;http://java.sun.com/jsp/jstl/core&quot; prefix=&quot;c&quot; %&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Spittles&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      
  &lt;p&gt;now showing message is - &lt;c:out value=&quot;${message.message}&quot;/&gt;&lt;/p&gt;
      
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>In browser it's looks like:
  <a href="https://i.stack.imgur.com/ZVhqB.png" rel="nofollow noreferrer">enter image description here</a></p>