Hi guys this is the simple class I want to use
//class code
import java.sql.*;
public class UserCon
{
Connection con=null;
public Connection returnUserCon(
String x)
{
try{
Class.forName"sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc
dbc:ccrs_mdb");
}catch(Exception e)
{
e.printStackTrace();
}
return con;
}
}
i put the class file in \webapps\examples\WEB-INF\classes folder
but when i run the JSP the error message comes is as below
org.apache.jasper.JasperException: Unable to compile class for JSP..\work\localhost\examples\_0002fccrs_0005fjsp_0002fcusfydate_0002ejspcusfydate_jsp_0.java:21: Class ccrs_0005fjsp.UserCon not found.
UserCon ucon = new UserCon();
after looking at the message i put the class file in \work\localhost\examples\ccrs_0005fjsp folder
but now the error message comes is
org.apache.jasper.JasperException: Unable to compile class for JSPerror: File ..\work\localhost\examples\ccrs_0005fjsp\UserCon.class does not contain type ccrs_0005fjsp.UserCon as expected, but type UserCon. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
..\work\localhost\examples\_0002fccrs_0005fjsp_0002fcusfydate_0002ejspcusfydate_jsp_0.java:21: Class ccrs_0005fjsp.UserCon not found.
UserCon ucon = new UserCon();
please suggest me where should i keep the class file or where i hv to make changes
this was the sample class, like this I hv to actually use some other classes.
thanks and regards
Bansal