how to getting multiple checkboxes values without using array
hi everybody,
my problem is when i want to get some value in a java file as:
String Worldwide=request.getParameter("Worldwide"); //checkbox
String America=request.getParameter("America"); //checkbox
if(Worldwide!=null)
{
if(Worldwide.equals("on"))
{
//some code here
}
}
if(America!=null)
{
if(America.equals("on"))
{
//some code here
}
}
is this code ok? it does not give me proper result.
but using following code i get the result :
1st give all checkboxes same name but different values and then.
String shiplocations[]=request.getParameterValues("shiplocation");
then getting the values from this array of string.
is there any way to get the values without using getParameterValues(..)?
can anyone help me?

