If I run my web project, in the first call I get the right Parameter (request.getParamter(userid)),
but if I do more then one call, the request.getParamter
Method always returns null.
I don't know why, and I have tried many things.
Thank you for your help.
in jsp I have this:
function addPersonToDatabase(userID){
var check = 0;
for (var zaehler = 0; zaehler < (document.getElementsByName("notinProject[]").length);
zaehler++) {
if (document.getElementsByName("notinProject[]")[zaehler].checked) {
location.href='<%=request.getContextPath()%>/administration/persons
action=addfrompersons&comingfrom=' + location.href + '&username=' + userID;
check++;
}
}
<form name='setcheckbox' id='setcheckbox' action='PersonControllerServlet' method='post' >
<input type="checkbox" name="notinProject[]" value="" onclick='javascript:addPersonToDatabase("
<%=lobjPerson.userName%)'><br> </td>
in servlet I have this:
String lstrUserName=request.getParameter("username");
– java java Jun 03 '13 at 10:32