Skip to content

Instantly share code, notes, and snippets.

@iruslani
Created August 14, 2012 18:32
Show Gist options
  • Save iruslani/3351518 to your computer and use it in GitHub Desktop.
Save iruslani/3351518 to your computer and use it in GitHub Desktop.
Accept jsp parameter and set a boolean value
<%
// Take product ID from redirect parameter:
String prod= request.getParameter("prod");
boolean freeProduct = false;
if ((request.getParameter("prod") == null)) {prod = "0";}
if (prod.equals("0")) {freeProduct = true;}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment