
I am working in jsf2.Fro a demo i created database in ms access.no wi want to retrive a record from database for a particular data.I need help as I am stuck in it.

We are providing you a simple example of MS access database connectivity with jsp.
Follow these steps:
1)Go to the start>>Control Panel>>Administrative Tools>> data sources.
2)Click Add button and select the driver Microsoft Access Driver(*.mdb).
3)After selecting the driver, click finish button.
4)Then give Data Source Name and click ok button.
5)Your DSN will get created.
6) Restart your server and run your jsp code.
Here is your required code:
<%@page import="java.sql.*"%>
<table border=1>
<tr><th>Name</th><th>Address</th></tr>
<%
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:student");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from data");
while(rs.next()){
%>
<tr><td><%=rs.getString("name")%></td><td><%=rs.getString("address")%></t
d></tr>
<%
}
rs.close();
st.close();
con.close();
}
catch(Exception e){}
%>
</table>

This was not usefull to me.I am working in jsf2.I made a database having name,Scname,date,prodName.If i need to retrieve data of a particular name ,how i will get?
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.