
search functionality using jsp from database

1)form.jsp:
<html> <form method="post" action="search.jsp"> Enter Id: <input type="text" name="id"><br> <input type="submit" value="Submit"> </form> </html>
2)search.jsp:
<%@ page import="java.sql.*" %>
<html>
<form>
<table>
<%
String value=request.getParameter("id");
int v=Integer.parseInt(value);
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root", "root");
Statement st=conn.createStatement();
ResultSet rs = st.executeQuery("select * from employee where id="+v+"");
if(rs.next()){
%>
<tr><td>Name: </td><td<input type="text" value="<%=rs.getString("name")%>" > </td></tr>
<tr><td>Address: </td><td<input type="text" value="<%=rs.getString("address")%>" > </td></tr>
<tr><td>Contact No: </td><td<input type="text" value="<%=rs.getInt("contactNo")%>" > </td></tr>
<tr><td>Email: </td><td<input type="text" value="<%=rs.getString("email")%>" > </td></tr>
<%
}
%>
</table>
</form>
</html>

i want source code for automatic discovery of personal name aliases from the web...... pls post the source code
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.