title: Http 500 Internal Server Error in Netbeans
body: <pre><code>&lt;%@page import="javax.naming.*,javax.sql.*,java.sql.*"%&gt;
  &lt;%@page import="java.io.*,java.util.*,java.sql.*"%&gt;
  &lt;%@page import="java.sql.DriverManager"%&gt;
  &lt;%@page contentType="text/html" pageEncoding="UTF-8" %&gt;
  &lt;%@page import="javax.servlet.http.*,javax.servlet.*" %&gt;
  &lt;html&gt;
      &lt;head&gt;&lt;title&gt;Displaying Employee List&lt;/title&gt;&lt;/head&gt;
      &lt;body&gt;
          &lt;% String message,Seat_no,Name,ans1,ans2,ans3,ans4,ans5;
          int Total=0;
          java.sql.Connection connect;
          java.sql.Statement stmt=null;
          java.sql.ResultSet rs=null;
          String url="jdbc:derby://localhost:1527/Senor [root on APP]";
          Class.forName("org.apache.derby.jdbc.ClientDriver");
          connect=DriverManager.getConnection(url,"root","root");
          message="Thank you";
          Seat_no=request.getParameter("Seat_no");
          Name=request.getParameter("Name");
          ans1=request.getParameter("group1");
          ans2=request.getParameter("group2");
          ans3=request.getParameter("group3");
          ans4=request.getParameter("group4");
          ans5=request.getParameter("group5");
          if(ans1.equals("True"))
              Total+=2;
          if(ans2.equals("False"))
              Total+=2;
          if(ans3.equals("True"))
              Total+=2;
          if(ans4.equals("False"))
              Total+=2;
          if(ans5.equals("False"))
              Total+=2;
          stmt=connect.createStatement();
          String query="Insert into she(Seat_no,Name,Total)values("+Seat_no+","+Name+","+Total+")";
          stmt.executeUpdate(query);
          stmt.close();
          response.setContentType("text/html");
          out.println("&lt;html&gt;");
          out.println("&lt;head&gt;");
          out.println("&lt;/head&gt;");
          out.println("&lt;body bgcolor=cyan&gt;");
          out.println("&lt;center&gt;");
          out.println("&lt;h1&gt;"+message+"&lt;/h1&gt;\n");
          out.println("&lt;h3&gt;Your results stored in our database&lt;/h3&gt;");
          out.println("&lt;table border=5&gt;");
          java.sql.Statement stmt2=connect.createStatement();
          String query1="Select * from she";
          rs=stmt2.executeQuery(query1);
          out.println("&lt;th&gt;"+"Seat_no"+"&lt;/th&gt;");
          out.println("&lt;th&gt;"+"Name"+"&lt;/th&gt;");
          out.println("&lt;th&gt;"+"Marks"+"&lt;/th&gt;");
          while(rs.next())
          {
              out.println("&lt;tr&gt;");
              out.println("&lt;td&gt;"+rs.getString(1)+"&lt;/td&gt;");
              out.println("&lt;td&gt;"+rs.getString(2)+"&lt;/td&gt;");
              out.println("&lt;td&gt;"+rs.getString(3)+"&lt;/td&gt;");
              out.println("&lt;/tr&gt;");
          }
          out.println("&lt;/table&gt;");
          if(rs!=null)
              rs.close();
          if(stmt!=null)
              stmt.close();
          if(connect!=null)
              connect.close();
          out.println("&lt;/center&gt;");
          out.println("&lt;/body&gt;&lt;/html&gt;");
          Total=0;
  
  
  
  
  
  
          %&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  
  
  This is the jsp program i used and here is the html code for it
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Database test&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;center&gt;
          &lt;form action="Action.jsp" method="post"&gt;
              &lt;div align="left"&gt;
                  &lt;br&gt;
              &lt;/div&gt;
              &lt;b&gt;
                  Seat number:&lt;/b&gt;
              &lt;input type="text" name="Seat_no"&gt;
              &lt;div align="right"&gt;
                  &lt;b&gt;Name:&lt;/b&gt;&lt;input type="text" name="Name" size="50"&gt;&lt;br&gt;
              &lt;/div&gt;
              &lt;br&gt;
              &lt;br&gt;
              &lt;b&gt;1.Im intelligent.&lt;/b&gt;&lt;br/&gt;
              &lt;input type="radio" name="group1" value="True"&gt;True
              &lt;input type="radio" name="group1" value="False"&gt;False&lt;br&gt;
              &lt;b&gt;2.Im a dog.&lt;/b&gt;&lt;br/&gt;
              &lt;input type="radio" name="group2" value="True"&gt;True
              &lt;input type="radio" name="group2" value="False"&gt;False&lt;br&gt;
              &lt;b&gt;3.Fast and steady wins.&lt;/b&gt;&lt;br/&gt;
              &lt;input type="radio" name="group3" value="True"&gt;True
              &lt;input type="radio" name="group3" value="False"&gt;False&lt;br&gt;
              &lt;b&gt;4.Be true.&lt;/b&gt;&lt;br/&gt;
              &lt;input type="radio" name="group4" value="True"&gt;True
              &lt;input type="radio" name="group4" value="False"&gt;False&lt;br&gt;
              &lt;b&gt;5.Strike the iron while it is hot.&lt;/b&gt;&lt;br/&gt;
              &lt;input type="radio" name="group5" value="True"&gt;True
              &lt;input type="radio" name="group5" value="False"&gt;False&lt;br&gt;
              &lt;br&gt;
              &lt;br&gt;
              &lt;br&gt;
              &lt;center&gt;
                  &lt;input type="submit" value="Submit"&gt;&lt;br&gt;&lt;br&gt;
              &lt;/center&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I could run my HTML program but when i click the Submit button i am directed to the error page. I've added the necessary JAR folders and still don't get the output.Stuck up with this for more than 4 days!I tried the same program around 3 months back and it worked out just fine! Where am i going wrong?</p>