function form_submit(test) {
document.leadForm.name.value = test;
document.leadForm.mob.value = mob;

session.object("sessiontest")=test;
}
<form name="leadForm" >
<input type="hidden" name="name"/>
<input type="hidden" name="mob"/>
<button onClick="form_submit(test)" name="btnLogon" id="btnLogon" />
...
</form>

how can i create session in javascript form_submit function when form is submitted.
and how can i get the session object in another jsp page?