how to call Stored Procedure and get a Array of parameters

I am getting parameters from the other web page like this. I need to call the Stored Procedure. How do i construct the STring array of parameters, if i construct it inside while or if clause, i can't call it outside the while clause. how do i go about this. while (enum.hasMoreElements()) { String name = (String) enum.nextElement(); String values[] = req.getParameterValues(name);