title: Passing Map to JSP
body: <p>I'm new to Spring MVC / JSP world. Sorry if below problem is obvious,</p>
  
  <p>I've a map <code>Map&lt;BigInteger, String&gt; reports = new HashMap&lt;&gt;();</code> that needs to be passed to JSP from controller. 
  The content of map will be like this</p>
  
  <pre><code>reports.put(new BigInteger("101"), "type1");
  reports.put(new BigInteger("102"), "type2");
  reports.put(new BigInteger("103"), "type3");
  </code></pre>
  
  <p>From Spring MVC controller I'm passing this map as below:</p>
  
  <pre><code>ModelAndView mav = new ModelAndView("view");
  mav.addObject("reports", reports);
  </code></pre>
  
  <p>But when I'm trying to access this in <strong>view.jsp</strong> with below scriplet:-</p>
  
  <pre><code>&lt;% String a1 = request.getAttribute("reports").get(new BigInteger("101")); %&gt;
  </code></pre>
  
  <p>But this gives me the following exception:</p>
  
  <pre><code>PWC6199: Generated servlet error:
  cannot find symbol
    symbol:   method get(java.math.BigInteger)
    location: class java.lang.Object
  </code></pre>
  
  <p>Same exception if I tried to get the value using Expression as below:-</p>
  
  <pre><code>&lt;%= request.getAttribute("reports").get(new BigInteger("101")) %&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>