JSP - Multiple parameters from request.

To access request parameters in you JSP files, you could do this below


 String value = request.getParameter("value_to_acces"); 


To access multiple values for the same parameter, you could do this below


 String [] values = request.getParameterValues("value_to_access"); 


For JSP best practice, you should not use scriptlets. Scriplets increases the design pattern called spaghetti. Hope this helps!

Subscribe to RSS - jsp