after runing the following code on netbeans
ide 7.0 beta i got following error :"C:\Users\avinash\Documents\NetBeansProjects\CYBERSPACE\nbproject\build-impl.xml:708
The module has not been deployed".
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class sample1 extends HttpServlet
{
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
{
HttpSession session=req.getSession(true);
try
{
Class.forName("oracle.jdbc.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","avinash");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from customer");
PrintWriter pw=res.getWriter();
res.setContentType("text/html");
String uname=null;
String pwd=null;
String c_id=null;
boolean flag = false;
String s1=req.getParameter("cust_id");
String s2=req.getParameter("username");
String s3=req.getParameter("password");
while(rs.next())
{
c_id=rs.getString(1);
uname=rs.getString(2);
pwd=rs.getString(3);
if(s1.equals(c_id) && s2.equals(uname) && s3.equals(pwd))
{
flag=true;
}
}
if(flag)
{
session.setAttribute("cust_id", s1);
res.sendRedirect("http://localhost:8084/CYBERSPACE/Cust_Home.jsp");
}
else
{
pw.println("Invalid");
pw.println("<a href='http://localhost:8084/CYBERSPACE/c_signin.jsp'> ok </a>");
}
}
catch(Exception e)
{
}
}
}