package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");
      out.write("   \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write("        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("        <title>JSP Page</title>\n");
      out.write("        <SCRIPT LANGUAGE=\"JavaScript\">\n");
      out.write("          function fun()\n");
      out.write("          {\n");
      out.write("              //window.alert(\"sri\");\n");
      out.write("                var uname=document.getElementById(\"uname\").value;\n");
      out.write("             \n");
      out.write("\t\tvar password=document.getElementById(\"pword\").value;\n");
      out.write("               \n");
      out.write("\t\tif(uname==null || uname==\"\")\n");
      out.write("                    window.alert(\"please enter username\");\n");
      out.write("\t\telse \n");
      out.write("\t\tif(password==null || password==\"\")\n");
      out.write("                    {\n");
      out.write("\t\twindow.alert(\"please enter password\");\n");
      out.write("       \n");
      out.write("                    }\n");
      out.write("\t\telse \n");
      out.write("                 {   \n");
      out.write("                    \n");
      out.write("                   if(uname==\"sree\" && password==\"sree\")\n");
      out.write("\t\t   {\n");
      out.write("\t\t\t//document.getElementById(\"fid\").action=\"sview.jsp\";\n");
      out.write("\t\t\t//document.getElementById(\"fid\").submit();\n");
      out.write("                        document.forms[\"f1\"].submit();\n");
      out.write("\t\t   }\n");
      out.write("                   else \n");
      out.write("                   {\n");
      out.write("                      window.alert(\"please enter correct username and password\"); \n");
      out.write("                   }    \n");
      out.write("\t         }\n");
      out.write("          }\n");
      out.write("          \n");
      out.write("       </SCRIPT>\n");
      out.write("       \n");
      out.write("       <style>\n");
      out.write("div\n");
      out.write("{\n");
      out.write("color:red;\n");
      out.write("width:180;\n");
      out.write("font-family:Comic Sans MS;\n");
      out.write("text-align:center;\n");
      out.write("}\n");
      out.write("a\n");
      out.write("{\n");
      out.write("text-decoration:none;\n");
      out.write("font-family:Comic Sans MS;\n");
      out.write("color:black;\n");
      out.write("cursor:hand;\n");
      out.write("}\n");
      out.write("input {border:5px;color:red;padding:2px;}\n");
      out.write("\n");
      out.write("</style>  \n");
      out.write("   </head>\n");
      out.write("       <body background=\"images\\bg.jpg\" width=\"90%\" scrolling=\"no\">\n");
      out.write("       \n");
      out.write("       <table bgcolor=\"#ccccff\" width=100% border=2>   \n");
      out.write("            <tr><td><img src=\"images\\2.jpg\" height=\"125\" width=\"398px\"></img></td>\n");
      out.write("                \n");
      out.write("                <td style=\"text-align:center; font-family:Comic Sans MS; font-size:45px; color:Maroon;\"><b>Mechanical Questionnaire</b></td>\n");
      out.write("                \n");
      out.write("                <td><img src=\"images\\rmirror2.jpg\" height=\"125\" width=\"398px\"></img></td>\n");
      out.write("                </tr>\n");
      out.write("        </table>\n");
      out.write("        <pre>\n");
      out.write("            \n");
      out.write("            \n");
      out.write("            \n");
      out.write("            \n");
      out.write("            \n");
      out.write("        </pre>\n");
      out.write("        \n");
      out.write("        \n");
      out.write("        \n");
      out.write("        \n");
      out.write("     ");
 if(request.getAttribute("x")!=null)
                    out.println(request.getAttribute("x")); 
      out.write("\n");
      out.write("    <div><center>LOGIN</center></div><br><br>\n");
      out.write("   <form name=\"f1\" background=\"images\\bg.jpg\" action=\"question_bank.jsp\" method=\"post\">\n");
      out.write("   <center><table border=\"0\">\n");
      out.write("<tr>\n");
      out.write("<td style=\"text-align:center; font-family:Comic Sans MS; font-size:20px; color:white;\" ><b>User Name</b></td>\n");
      out.write("\n");
      out.write("<td><input type=\"text\" name=\"username\" id=\"uname\" size=\"12\" /></td>\n");
      out.write("\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("<td style=\"text-align:center; font-family:Comic Sans MS; font-size:25px; color:white;\"><b>Password</b></td>\n");
      out.write("\n");
      out.write("<td><input type=\"password\" name=\"password\" id=\"pword\" size=\"12\" /></td>\n");
      out.write("</tr>\n");
      out.write("</table></center>\n");
      out.write("<tr>\n");
      out.write("    \n");
      out.write("    <center><input type=\"button\" value=\"Confirm\" onclick=\"fun()\" />\n");
      out.write("\n");
      out.write("&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type=\"reset\" value=\"Cancel\" name=\"reset\" /></center>\n");
      out.write("\n");
      out.write("</form>\n");
      out.write("</body>\n");
      out.write("</html>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("        \n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
