title: Sending parameters from JSP to spring controller
body: <p>I am developing a web app using spring MVC. I am passing the parameters from JSP to spring controller in the below format. Like I have to pass two parameters so I am doing</p>
  
  <pre><code>&lt;a href="/spring.html?data1=&lt;%=data1 %&gt;?data2=&lt;%=data2 %&gt;"&gt; Hello &lt;/a&gt;
  </code></pre>
  
  <p>My assumption is that in the spring controller, I can receive the output as the following </p>
  
  <pre><code>data1= request.getAttribute("data1");
  data2= request.getAttribute("data2");
  </code></pre>
  
  <p>Is this the correct way to pass the parameters . I have dry run my code many times still my pages gives null pointer so I doubt whether it is because of this . Could you ppl please let me know about this. Thank you.</p>