title: Code print on browser (Firefox)
body: <p><img src="https://i.stack.imgur.com/ShBX2.jpg" alt="enter image description here"></p>
  
  <p>I am using this code to make user login form the issue is I am able to login from Internet Explorer but when I login from Firefox this same code prints the HTML version of the code on the screen.</p>
  
  <p>This code prints the pending list after login:</p>
  
  <pre><code> &lt;%@ page language = "java" import="java.util.Iterator"  import="java.util.ArrayList"     import="java.lang.*" contentType = "text/html; charset = ISO-8859-1"
       %&gt;
  &lt;%@ page errorPage="/error.jsp" %&gt;
  &lt;%    
      response.setHeader("Pragma", "no-cache");
      response.setHeader("Cache-Control", "no-store");
      response.setHeader("Expires", "0");
      response.setDateHeader("Expires", -1);
      //session = request.getSession(false);
      //               session.invalidate();
      //             session = request.getSession(true);
   %&gt;
  
  
  
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0     Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
   &lt;html&gt;
       &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
          &lt;title&gt;All Pending List &lt;/title&gt;
           &lt;style type="text/css"&gt;
              &lt;!--
               @import"Image/cssmenuvertical.css";
               --&gt;
  
  
            &lt;/style&gt;
  
            &lt;meta http-equiv="pragma" content="no-cache"/&gt;
            &lt;meta http-equiv="cache-control" content="no-cache"/&gt;
            &lt;meta http-equiv="expires" content="0"/&gt;    
            &lt;meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/&gt;
            &lt;meta http-equiv="description" content="This is my page"/&gt;
  
  
            &lt;script language="JavaScript" type="text/JavaScript"&gt;
  
  
               function goToURL()
                {
                  window.location="logout.jsp";
  
               }
               function bck()
              {
                  window.history.forward();
  
              }
                setTimeout("bck()",0);
                &lt;/script&gt;
                &lt;title&gt;All Pending Details&lt;/title&gt;
           &lt;/head&gt;
  
        &lt;body bgcolor="lightblue"&gt;
  
  
           &lt;% String val="for upload";
            session.setAttribute("val", val);
            %&gt;
            &lt;%            
                if (session.getAttribute("aa") != null) {
  
            %&gt;
           &lt;%            
               String findval = "find validation";
               session.setAttribute("findval", findval);%&gt;
            &lt;form id="form_id" action="" method="" &gt;
                &lt;table id='table1' align="center" &gt;
                   &lt;tr&gt;
                       &lt;td style="background-image: url(Image/header.jpg); width: 800px; height:           40px" color="lightblue"&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                         &lt;tr&gt;
                           &lt;td&gt;
  
                           &lt;ul id="navmenu"&gt;
                               &lt;li&gt;&lt;a href="#"&gt;Find &gt;&lt;/a&gt;
                                  &lt;ul&gt;
                                      &lt;li&gt;&lt;a href="Find_ip.jsp"&gt;By IP &lt;/a&gt;&lt;/li&gt;
                                     &lt;li&gt;&lt;a href="find_mac.jsp"&gt;By Mac Address &lt;/a&gt;&lt;/li&gt;
                                  &lt;li&gt;&lt;a href="find_date.jsp"&gt;By Date &lt;/a&gt;&lt;/li&gt;
                                  &lt;li&gt;&lt;a href="find_email.jsp"&gt;By Email &lt;/a&gt;&lt;/li&gt;
                                  &lt;li&gt;&lt;a href="find_approve"&gt;By Approved &lt;/a&gt;&lt;/li&gt;
                                  &lt;li&gt;&lt;a href="find_remove"&gt;By Removed &lt;/a&gt;&lt;/li&gt;
                                   &lt;li&gt;&lt;a href="find_reg.jsp"&gt;By Registration ID&lt;/a&gt;&lt;/li&gt;
  
  
                              &lt;/ul&gt;
                          &lt;/li&gt;
  
  
  
                          &lt;li&gt;&lt;a href="AlluploadedForms"&gt;| Uploaded Forms &gt;&lt;/a&gt;&lt;/li&gt;
  
                          &lt;li&gt;  &lt;a href="logout.jsp"&gt;| Logout &gt;&lt;/a&gt;
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;&lt;br/&gt;
          &lt;center&gt;
              &lt;FONT COLOR="#0000FF" size="4"&gt;&lt;b&gt;All Pending List&lt;/b&gt;&lt;/FONT&gt;
              &lt;br/&gt;
              &lt;br/&gt;
          &lt;/center&gt;
          &lt;center&gt;
              &lt;TABLE cellpadding="15" border="1" style="background-color: #C2DFFF"&gt;
                  &lt;th &gt;&lt;FONT COLOR="#0000FF"&gt;Registration NO.&lt;/FONT&gt;&lt;/th&gt;
                  &lt;th&gt;&lt;FONT COLOR="#0000FF"&gt;Administrator Name&lt;/FONT&gt;&lt;/th&gt;
                  &lt;th&gt;&lt;FONT COLOR="#0000FF"&gt; Email&lt;/FONT&gt;&lt;/th&gt;
                  &lt;th&gt;&lt;FONT COLOR="#0000FF"&gt; Division Name&lt;/FONT&gt;&lt;/th&gt;
                  &lt;th&gt;&lt;FONT COLOR="#0000FF"&gt; Registration Date&lt;/FONT&gt;&lt;/th&gt;
  
                  &lt;%                        
  
  
                      ArrayList all = (ArrayList) session.getAttribute("values");
                      Iterator i = all.iterator();
                      while (i.hasNext()) {
                          String t = (String) i.next();
  
  
                          out.println(t);
  
                      }
  
  
                  %&gt;
  
              &lt;/TABLE&gt;
              &lt;table&gt;&lt;tr&gt;&lt;td&gt;
                          &lt;input type="button" name="logout" value="Logout" onclick="goToURL();"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  
              &lt;%} else {
                      response.sendRedirect("logout.jsp");
  
  
                  }%&gt;
  
          &lt;/center&gt;
      &lt;/form&gt;
      &lt;center&gt;&lt;FONT COLOR="#0000FF"&gt; Government Of India&lt;br/&gt;
              Ministry Of Communications and Information Technology&lt;br/&gt;
              Department of Information Technology &lt;/FONT&gt;&lt;/center&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>After login on that page from Firefox</p>