can u tel me where should i place the code for database connection?..is it placed in the same directory as other jsp and html files?....shall i put it in a java bean and then include it in all the other jsp files?..i
Never ever put business / backend logic in your JSP file. It's not what it was meant for. JSP is a presentation technology. Place your logic inside Servlets / EJB's and use DAO(Data Access Objects) to access your database. Reading the official J2EE tutorial would clear up things for you.
thx a lot..i tried doin that..but an error is comin..
first file name is main.jsp. process.jsp is the action file and login.java is the db connection class.i placed login in a folder named foo under classes in WEB-INF (WEB-INF->classes->foo->login.java)...but it still shows the error..
HTTP Status 500 -