You can try this way also,
Html:
<form action="javascript:next()" method="post">
<input type="submit" value=Submit /></form>
Javascript:
function next(){
//Location where you want to forward your values
window.location.href = "http://localhost:8563/And/try1.jsp?dymanicValue=" + values;
}