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
<a href="/spring.html?data1=<%=data1 %>?data2=<%=data2 %>"> Hello </a>
My assumption is that in the spring controller, I can receive the output as the following
data1= request.getAttribute("data1");
data2= request.getAttribute("data2");
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.