how to pass a parameter from jsp to servlet using form which is not belong to any field of form without using session.i think code may be look like below example but doesn't work for me.plz help me.
in index.jsp:-
<form method="Post" action="servlet"> <input type="text" name="username"> <input type="password" name="password"> <% int z=1; request.setAttribute("product_no", z);%> <input type='submit' /> </form> in servlet.java:-
int x=Integer.parseInt(request.getAttribute("product_no").toString());