Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:28:01+00:00 2026-06-03T02:28:01+00:00

I am using this code to make user login form the issue is I

  • 0

enter image description here

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.

This code prints the pending list after login:

 <%@ page language = "java" import="java.util.Iterator"  import="java.util.ArrayList"     import="java.lang.*" contentType = "text/html; charset = ISO-8859-1"
     %>
<%@ page errorPage="/error.jsp" %>
<%    
    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);
 %>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0     Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
     <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>All Pending List </title>
         <style type="text/css">
            <!--
             @import"Image/cssmenuvertical.css";
             -->


          </style>

          <meta http-equiv="pragma" content="no-cache"/>
          <meta http-equiv="cache-control" content="no-cache"/>
          <meta http-equiv="expires" content="0"/>    
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
          <meta http-equiv="description" content="This is my page"/>


          <script language="JavaScript" type="text/JavaScript">


             function goToURL()
              {
                window.location="logout.jsp";

             }
             function bck()
            {
                window.history.forward();

            }
              setTimeout("bck()",0);
              </script>
              <title>All Pending Details</title>
         </head>

      <body bgcolor="lightblue">


         <% String val="for upload";
          session.setAttribute("val", val);
          %>
          <%            
              if (session.getAttribute("aa") != null) {

          %>
         <%            
             String findval = "find validation";
             session.setAttribute("findval", findval);%>
          <form id="form_id" action="" method="" >
              <table id='table1' align="center" >
                 <tr>
                     <td style="background-image: url(Image/header.jpg); width: 800px; height:           40px" color="lightblue"></td>
                      </tr>
                       <tr>
                         <td>

                         <ul id="navmenu">
                             <li><a href="#">Find ></a>
                                <ul>
                                    <li><a href="Find_ip.jsp">By IP </a></li>
                                   <li><a href="find_mac.jsp">By Mac Address </a></li>
                                <li><a href="find_date.jsp">By Date </a></li>
                                <li><a href="find_email.jsp">By Email </a></li>
                                <li><a href="find_approve">By Approved </a></li>
                                <li><a href="find_remove">By Removed </a></li>
                                 <li><a href="find_reg.jsp">By Registration ID</a></li>


                            </ul>
                        </li>



                        <li><a href="AlluploadedForms">| Uploaded Forms ></a></li>

                        <li>  <a href="logout.jsp">| Logout ></a>
                        </li>
                    </ul>
                </td>
            </tr>
        </table><br/>
        <center>
            <FONT COLOR="#0000FF" size="4"><b>All Pending List</b></FONT>
            <br/>
            <br/>
        </center>
        <center>
            <TABLE cellpadding="15" border="1" style="background-color: #C2DFFF">
                <th ><FONT COLOR="#0000FF">Registration NO.</FONT></th>
                <th><FONT COLOR="#0000FF">Administrator Name</FONT></th>
                <th><FONT COLOR="#0000FF"> Email</FONT></th>
                <th><FONT COLOR="#0000FF"> Division Name</FONT></th>
                <th><FONT COLOR="#0000FF"> Registration Date</FONT></th>

                <%                        


                    ArrayList all = (ArrayList) session.getAttribute("values");
                    Iterator i = all.iterator();
                    while (i.hasNext()) {
                        String t = (String) i.next();


                        out.println(t);

                    }


                %>

            </TABLE>
            <table><tr><td>
                        <input type="button" name="logout" value="Logout" onclick="goToURL();"/></td></tr></table>

            <%} else {
                    response.sendRedirect("logout.jsp");


                }%>

        </center>
    </form>
    <center><FONT COLOR="#0000FF"> Government Of India<br/>
            Ministry Of Communications and Information Technology<br/>
            Department of Information Technology </FONT></center>
</body>

After login on that page from Firefox

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:28:03+00:00Added an answer on June 3, 2026 at 2:28 am

    That will happen when the content is been interpreted as text/plain instead of as text/html. That can only mean that the HTTP response Content-Type is been set to text/plain, or is broken, or is missing.

    Check the HTTP response headers with a HTTP traffic checker. If you have Firebug installed, then press F12 and check Net tab. The Content-Type header must say at least text/html. This is by default already the case. Perhaps you’ve some Filter which is doing its job wrong.


    Unrelated to the concrete problem, you are not consistent with specifying the response character encoding in the JSP code as initially posted in your question. You’re specifying ISO-8859-1 in the HTTP response header and you’re specifying UTF-8 in the HTML meta head. This makes no sense. This should however not cause this kind of problem.

    By the way, “Department of Information Technology” and then that oldschool style of writing JSPs full of deprecated HTML elements and poor practices…? Is this a hobby site or something?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've tried using this code and this to make a random quote generator, but
I'm using this code now echo $form->input('username'); How do I make sure the label
I'm wondering how I can make this code safer, I'm using it as login.php:
Im planing on using this code to make random sounds play with an action,
How to make this css code cross browser compatible using jquery. this code only
Ho to make this simple xml with php using DOM? Full code will be
i am trying to make a custom login form in drupal-6.22 using Email Registration
I am trying to make the login work... but when i register (using the
I am using the following code to make a certain section of my form
Using this code to zip a folder and it works perfect on small files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.