title: jsp request.getParameter
body: <p>Edited, Still this is not working exactly, but I need to set a page_type on each page of a website. That page_type needs to be checked by some java and do code based on the page_type.
  The problem is, the if else statements are not being done correctly. Nothing happens because the parameter doesn't seem to be placed.
  main page where page_type is being set:</p>
  
  <pre><code>&lt;div id="DYK_area"&gt;
   &lt;jsp:include page="/imgs/random_dyk.jsp" flush="true"&gt;
   &lt;jsp:param name="Page_type" value="prenatalOverviewArea"&gt;&lt;/jsp:param&gt;
   &lt;/jsp:include&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Where the code is being checked</p>
  
  
  
  <pre><code>&lt;% String pageType = request.getParameter("page_type")==null?"": request.getParameter("page_type"); 
  String image_name="";   
      if(pageType.equals("prenatalOverviewArea")){
          int random = (int )(Math.random() * 10 + 1);
          image_name= "/images/did_you_know/dyk_p_" + random + ".png";
      }
      else if(pageType.equals("prenatalNorm")){
          int random = (int )(Math.random() * 25 + 1);
          image_name= "/images/did_you_know/dyk_p_" + random + ".png";
      }
      else if(pageType.equals("overviewArea")){
          int random = (int )(Math.random() * 20 + 1);
          image_name= "/images/did_you_know/dyk_" + random + ".png";
      }
      else if(pageType.equals("overviewNorm")){
          int random = (int )(Math.random() * 45 + 1);
          image_name= "/images/did_you_know/dyk_" + random + ".png";
      }
  
  if(!image_name.equals("")){
  %&gt;
  
  &lt;img id="dyk_random" src="&lt;%=image_name%&gt;"/&gt;
  
  &lt;%}%&gt;
  </code></pre>