title: passing a value from controller to jsp in spring MVC using map
body: <p>i have a controller like this. i want to get this serverIp and port in a jsp which contains a javascript. i tried ${serverIp} and     ${port} but its not working. what exactly to write in jsp</p>
  
  <pre><code>public @ResponseBody ModelAndView getControllerAndServer(ModelAndView model,@RequestParam("siteId") Integer siteId) {   
  
  
  String serverIp= null;
      Integer port = null;
      List&lt;Object[]&gt; serverAndController = controllerDao.getControllerAndServerInfo(siteId);
      Map &lt;String, ControllerDao&gt; map = new HashMap &lt;String, ControllerDao&gt;();
  
  
          int i=0;
          Object[] result = serverAndController.get(i);
          if(result!=null)
          {
          serverIp=(String)result[7];
          model.addObject(serverIp);
          port = (Integer)result[8];
          model.addObject(port);
  
          }
           if(map.containsKey(siteId)){
                 map.get(serverIp);
                 map.get(port);
  
          }
  
  
      return model;
  }
  </code></pre>