This form based application can be used to searching multiple text fields.This is mainly used for Filtering the records base on DataBase.This Form is mainly for searching the records text by text entering it's based on entering text fields.
<% out.println("select *from emptable emp where emp.empId like '%"+request.getParameter("empId")+"%' and " + " emp.empName like '%"+request.getParameter("empName")+"%' and" + " emp.empSalary like '%"+request.getParameter("empSalary")+"%' ");
out.println("select count(*) from emptable"); %> <sql:query var="empData" dataSource="${emp}"> select *from emptable emp where emp.empId like '%<%=request.getParameter("empId")%>%' and emp.empName like '%<%=request.getParameter("empName")%>%' and emp.empSalary like '%<%=request.getParameter("empSalary")%>%' </sql:query>
HI Ashok it's good but it's not recommended to write database code in jsp's in real time scenarios . my suggestion is if we use ajax we can reduce page page loading traffic... :-)
Thanks @Anonymous....Sorry frd's my account somebody hacked and currently am not using this account and blog..i started new blog..i will inform once completed...I don't have permissions to access this account and blog.
thanks ashok for giving me the searching form based app..
ReplyDeleteHI Ashok it's good but it's not recommended to write database code in jsp's in real time scenarios . my suggestion is if we use ajax we can reduce page page loading traffic... :-)
ReplyDeleteThanks @Anonymous....Sorry frd's my account somebody hacked and currently am not using this account and blog..i started new blog..i will inform once completed...I don't have permissions to access this account and blog.
ReplyDelete