can not execute servlet code

while developing servlet program i suffered from a probem i used netbeans ide and used glassfish server
here is my code for the index.html file:-

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <body>
        <form action="NewServlet">
            name:<input type="text" name="t1">
            password:<input type="password" name="t1">
            <input type="submit" value="login">
        </form>
    </body>
</html>

and code for servlet is:-

import java.io.*;
import javax.servlet.*;

/**
 *
 * @author Prathamesh
 */
public class NewServlet extends GenericServlet {
    @Override
    public void service(ServletRequest req,ServletResponse res)throws ServletException,IOException
    {
        res.setContentType("text/html");
        PrintWriter pw=res.getWriter();
        String un="abc";
        String pwd="xyz";
        String p1=req.getParameter("t1");
        String p2=req.getParameter("t2");
        if((p1.equals(un))&&(p2.equals(pwd)))
            pw.println("<h1>Welcome to home page</h1>");
        else
            pw.println("Invalid");
        pw.close();
    }
}

i think the problem is occuring while parsing the variables is servlet…
please any one can help me??


Download can.not.execute.servlet.code.zip
Direct Link


Download


Download can.not.execute.servlet.code.zip
Mediafire


Download


Download can.not.execute.servlet.code.zip
Uptobox


Download