jsp login page with jdbc connectivity to ms-access database
i hav been trying to solve the error..but couldnot
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@page language="java"%>
<%@page import="java.sql.*"%>
<%
String user = "";
String pwd ="";
Connection con = null;
Statement st = null;
try{
user = request.getParameter("un");
pwd = request.getParameter("pwd");
} catch(Exception e){
}
if(!user.equals("") && !pwd.equals("")){
try
{
Class.forName("Sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:nine","admin","");
st = st.executeupdate("Insert into Table9 values (' "+user+" ',' "+pwd+" ' )");
}
catch(Exception e){
e.printStackTrace();
} finally{
try{
if(st != null)
st.close();
if(con != null && con.isClosed() == false)
con.close();
}catch(SQLException sqe){
sqe.printStackTrace();
}
}
}
%>
[1187 byte] By [
mnda] at [2007-11-27 2:27:20]

the error is
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
[javac] C:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\__default-web-module-server\org\apache\jsp\reply1_jsp.java:88: incompatible types
[javac] found: int
[javac] required: java.sql.Statement
[javac] st = st.executeUpdate("INSERT INTO Table9 values (' "+user+" ',' "+pwd+" ' )");
[javac] ^
[javac] 1 error
mnda at 2007-7-12 2:37:54 >

> the error is
>
> org.apache.jasper.JasperException: Unable to compile
> class for JSP
>
> Generated servlet error:
> [javac]
> C:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-m
> dules\__default-web-module-server\org\apache\jsp\reply
> 1_jsp.java:88: incompatible types
>[javac] found: int
> [javac] required: java.sql.Statement
> [javac] st = st.executeUpdate("INSERT INTO Table9
> values (' "+user+" ',' "+pwd+" ' )");
>[javac] ^
> [javac] 1 error
Weren't you given already a solution to that particular error in one of your cross-posts in the JSP forum?
> > the error is
> >
> > org.apache.jasper.JasperException: Unable to
> compile
> > class for JSP
> >
> > Generated servlet error:
> > [javac]
> >
> C:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-m
> >
> dules\__default-web-module-server\org\apache\jsp\reply
>
> > 1_jsp.java:88: incompatible types
> >[javac] found: int
> > [javac] required: java.sql.Statement
> > [javac] st = st.executeUpdate("INSERT INTO Table9
> > values (' "+user+" ',' "+pwd+" ' )");
> >[javac] ^
> > [javac] 1 error
>
>
>
> Weren't you given already a solution to that
> particular error in one of your cross-posts in the
> JSP forum?
as usual, they're not looking for a solution, then. they're looking for someone to re-write the code for them. I hope I never have to work alongside any of these people