search functionality using jsp from database

Ads

 
 

Share on Google+Share on Google+

DILEEPKRISHNA
search functionality using jsp from database
2 Answer(s)      6 years and 4 months ago
Posted in : JSP-Servlet

search functionality using jsp from database

Ads
View Answers

July 5, 2011 at 5:15 PM


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>


May 15, 2012 at 7:26 PM


i want source code for automatic discovery of personal name aliases from the web...... pls post the source code


Ads









Related Tutorials/Questions & Answers:
search functionality using jsp from database
search functionality using jsp from database  search functionality using jsp from database
How to write a search functionality using javascript/jquery
How to write a search functionality using javascript/jquery   How to write a search functionality using javascript/jquery for ex: im searching "s" names it wil display "s" names
Advertisements
3 dropdown list from the database using JSP
3 dropdown list from the database using JSP  Hi, I'm new to JSP I want to create 3 dropdown list each depend on the other and get the options from the database using JSP
<img src=""> using retrieve image from database using jsp
using retrieve image from database using jsp  how to <img src="" > tag using retrieve image from database and display in jsp
Retrieve database from the table dynamically in jsp from oracle using servlet
Retrieve database from the table dynamically in jsp from oracle using servlet  Sir, I have created a table in oracle using eclipse, and added few... using java servlet from the database in the jsp page
how to display values from database into table using jsp
how to display values from database into table using jsp  I want to display values from database into table based on condition in query, how... for that in jsp, if i enter either bookname or authorname and click on search button
select value from autocomplete textbox using jquery in jsp from database.
select value from autocomplete textbox using jquery in jsp from database.  Hii Sir, Lots of thnx to ur reply .I went through both... of selecting value from autocomplete textbox using jquery in jsp from mysql database
select value from autocomplete textbox using jquery in jsp from database.
select value from autocomplete textbox using jquery in jsp from database. ... but was unable to find out exact way to fullfill the solution of selecting value from autocomplete textbox using jquery in jsp from mysql database. Kindly send me
Data needs to be gathered in XML file from the database (MySql) using JSP
data regarding particular id from the database table. Data needs to be gathered in XML file from the database (MySql) using appropriate JSP/Java Bean functions...Data needs to be gathered in XML file from the database (MySql) using JSP 
retrive image from database using jsp without stream
retrive image from database using jsp without stream  How to retrive image from database using jsp without stream like (inputStream
retrive data from database using jsp in struts?
retrive data from database using jsp in struts?   *search.jsp* <%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <... searchProduct(SearchDTO sdto) { String query="select * from product
fetch record from oracle database using jsp-servlet?
fetch record from oracle database using jsp-servlet?  how can i fetch data from oracle database by using jsp-servlet. i'm using eclipse, tomcat server and oracle database and creating jsp pages and also using servlet
Populate dropdown menu from database using jsp and servlet
Populate dropdown menu from database using jsp and servlet  please i need code to populate dropdown menu from mysql database using jsp and servlet. thanks
How to retrieve image from database using jsp and servlet?
How to retrieve image from database using jsp and servlet?  Hi, I am trying to find code for displaying the image from database in a JSP page. How to retrieve image from database using jsp and servlet
How to display image in jsp from database using Servlet?
How to display image in jsp from database using Servlet?  Hi, How to display image in jsp from database using Servlet? Thanks   Hi, You will find code and example program at Retrieve image from database using Servlet
Read code from excel sheet and upload into database using JSP
Read code from excel sheet and upload into database using JSP  I want to upload data to database from an excel worksheet using jsp ...Please help
search from database
search from database  DBUtil util = new DBUtil(); try { JOptionPane.showMessageDialog(null, "Connection Opened!"); Connection con...); }   i want to retrieve values from database and display them in my
retrive the employee details with image from mysql database using jsp servlet
retrive the employee details with image from mysql database using jsp servlet  im doing the web project to retrive the employee profile which i stored in the database using jsp servlet then want to show the result in the next jsp
Read data from excel file and update database using jsp
Read data from excel file and update database using jsp  read data from excel file and update database using jsp Hi, I am using a MySQL database... upload excel file and update database using JSP ? Thanks in Advance
Retrieve image from database using servlet and display in JSP
Retrieve image from database using servlet and display in JSP  Hi, I am total new to JSP although I am learning it for the last few days. Now I want to use MySQL Database from JSP page. How to retrieve image from database using
retrieve related data from database using jsp and mysql
retrieve related data from database using jsp and mysql  Hi sir, please give some example of jsp code for retrieving mysql database values in multiple dropdown list. if we change a value in a dropdown its related value must
connect to the database from JSP
connect to the database from JSP  How do you connect to the database from JSP?   A Connection to a database can be established from a jsp page by writing the code to establish a connection using a jsp scriptlets
how to read values from excel sheet and compare with database using jsp
how to read values from excel sheet and compare with database using jsp ... with database using jsp coding i.e, if i have 6(assetid,assetname,serialno,cubical... to database from excelsheet
how to generate reports from oracle database using jsp and ajax code
how to generate reports from oracle database using jsp and ajax code  Hai masters i am new to this Java world. my team leader ask me to generate sales report data from oracle database to jsp page please any one know how to do
How to get the data from the database using Servlet or JSP program
How to get the data from the database using Servlet or JSP program  ... database using JSP Get data from database using JSP... from the database like oracle . I have created one jsp program like this <
url parameter using retrive data from database in jsp
url parameter using retrive data from database in jsp   the user can... clicks the Preview button, you have to create a dynamic jsp which should read the contents from the db based on the event id. But this jsp url should be a public
how to upload an image from a jsp page to a mysql database table using jsp
how to upload an image from a jsp page to a mysql database table using jsp  how to upload an image from a jsp page to a mysql database table using jspstrong text
How to get data from Oracle database using JSP
the answer to retrieve data from the database by using servlet or jsp program...How to get data from Oracle database using JSP  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have
url parameter using retrive data from database in jsp
url parameter using retrive data from database in jsp  The user can... clicks the Preview button, you have to create a dynamic jsp which should read the contents from the db based on the event id. But this jsp url should be a public url
Acees data from database using combo box - JSP-Servlet
Acees data from database using combo box  please let me how i access the data from database when i select combo box combo2 having values Arts... value 11 or 12, otherwise combo box combo2 remain hide. Here is JSP's files
how to retrieve data from database using combobox value without using request.getParameter in jsp - JSP-Servlet
how to retrieve data from database using combobox value without using request.getParameter in jsp  Answer pl

Ads

 
Advertisement null

Ads