Ok i got the solution to this .
I just needed to provide my full url inside the href of my iframe.jsp as :
<a href = "<%=com.pack.href.getCamHref()%>&hamlistVal=<%=hamlistVal%>"/>
Then i needed to set the attribute target as "_parent" like this :
<a href = "<%=com.pack.href.getCamHref()%>&hamlistVal=<%=hamlistVal%>" target="_parent"/>
This makes the iframe disappear and opens the new.jsp on the p1.jsp.
Hope this helps others.
I got this one when i referred this thread : Stack Thread