I’m a PHP coder but need to code some JSP…
I need help… What is the equivalent of this PHP code?
foreach($_POST as $key => $value){
$$key = $value;
}
to jsp code…
further notes: the above codes is just a short cut of something like this,
$name = $_POST['name'];
$age = $_POST['age'];
$gender = $_POST['gender'];
and this sample 3 lines of codes in JSP is,
String name = request.getParameter("name");
Thanks!
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/forEach.html
for the variable variable name thing – i dont think that is possible in JSP (you do know that JSP is just a better template engine?)
also … you do know there is google right? 😛