If you are using ajax, is because you don't want to refresh the page. But for some reason if it is what you want, you can do it like so:
function Test(){
$.ajax({
type: 'POST',
url: 'testme?userId=<%=session.getAttribute("username").toString()%>',
success: function(){
location.reload();
}
});
}