retrive data from oracle to jsp
i am a beginer in jsp so please help me out.....
in file create project i am entering proj details such as id name cost and manager name and storing it in the data base.
in search proj fiel if user enters any one of the feild such as id name cost and manager the full details of the project should be displayed.
SearchProjDAO
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.PropertyResourceBundle;
import javax.naming.InitialContext;
import javax.naming.NoInitialContextException;
import javax.sql.DataSource;
import oracle.sql.ARRAY;
import weblogic.jdbc.pool.ResultSet;
import cruit.util.DBConnection;
import cruit.vo.SearchProjVO;
public final class SearchProjDAO
{
private static InitialContext context;
String CLASS_NAME="DBConnectionFactory";
public void submitProjectDetails(SearchProjVO searchprojVO)
{
String methodname="createConnection";
Connection conn = null;
PreparedStatement psmt;
try {
System.out.println("searchprojVO id=="+searchprojVO.getProjid());
System.out.println("in DAO");
conn = DBConnection.getJNDIConnection();
ArrayList ar = new ArrayList();
ResultSet rs = null;
while(rs.next())
{
SearchProjVO searchprojVO = new SearchProjVO();
psmt= conn.prepareStatement("select * from CR_EMPLOYEE_DETAILS");
psmt.setString(1,searchprojVO.getProjid());
psmt.setString(2,searchprojVO.getProjname());
psmt.setString(3,searchprojVO.getCost());
psmt.setString(4,searchprojVO.getManager());
psmt.executeQuery();
ar.add(searchprojVO);
}
System.out.println("conn==="+conn);
} catch (Exception e) {
e.printStackTrace(System.err);
}
}
}
SearchProjVO
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.PropertyResourceBundle;
import javax.naming.InitialContext;
import javax.naming.NoInitialContextException;
import javax.sql.DataSource;
public final class SearchProjVO
{
String projid;
String projname;
String cost;
String manager;
public String getCost() {
return cost;
}
public void setCost(String cost) {
this.cost = cost;
}
public String getManager() {
return manager;
}
public void setManager(String manager) {
this.manager = manager;
}
public String getProjid() {
return projid;
}
public void setProjid(String projid) {
this.projid = projid;
}
public String getProjname() {
return projname;
}
public void setProjname(String projname) {
this.projname = projname;
}
}
in SearchProjDAO i have to call servlet also how can i do this
i have connected to data base
View Answers
Related Tutorials/Questions & Answers:
retrive data from oracle to jspretrive data from oracle to jsp i am a beginer in
jsp so please help... cost and manager name and storing it in the
data base.
in search proj fiel...();
psmt= conn.prepareStatement("select *
from CR_EMPLOYEE_DETAILS
retrive data from database using jsp in struts? retrive data from database using
jsp in struts? *search.jsp*
<... searchProduct(SearchDTO sdto) {
String query="select *
from product...());
Connection con=DriverManager.getConnection("jdbc:
oracle:thin:@localhost:1521
Advertisements
url parameter using retrive data from database in jspurl 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
retrive data from database?retrive data from database? hellow
i have a database sheet name..... now i want
retrive sn,roll no and name and textbox
like....,rllno,and name
retrive retrive data from database retrive data from database hi..
i made a application form. it's have attribute s.no,name,roll no and i enter a few records. now i want to view all record not in database access sheet i want to view it at any another
url parameter using retrive data from database in jspurl 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
To retrive data from database - StrutsTo
retrive data from database How to get values ,when i select a select box in
jsp and has to get values in textbox automatically
from database?
eg... come to
jsp page automatically
from database
GWT -- retrive the data from DatabaseGWT --
retrive the
data from Database the user can create an event... 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. Means anyone
How to get data from Oracle database using JSP problem in
jsp in the sense to get
data from the database like
oracle . I have...
data from the database like
oracle), I have created one
jsp program like... in the sense to get
data from the database like
oracle . I have created one
jsp how to retrive data grom database in jsp pages.how to
retrive data grom database in
jsp pages. sir,
i have problem to retrieve
data from table of the database on the html web pages , so would... immediately.
i want sample code of
jsp to retrieving
data from table of database to html
Request URl using Retrive data from dtabaseRequest URl using
Retrive data from dtabase Using With GWT
the user... 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
Retrive values from an arraylist and display in a jsp?Retrive values
from an arraylist and display in a
jsp? Hi,
I need help in
jsp to display values of an ArrayList in
jsp.
There is a java file.... It might be helpful for you.
http://www.roseindia.net/
jsp/servlet-
jsp-
data how to insert data into database using jsp & retrivehow to insert
data into database using
jsp & retrive Hello,
I have created 1 html page which contain username, password & submit button. in my oracle10G database already contain table name admin which has name, password
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
Select tag to fetch data from oracle databaseSelect tag to fetch
data from oracle database I created a select box...
oracle database.Similarly when address will be selected by the user
from... of a student and when regnno is selected
from the drop down list by a user
Data fetching from JSP or HTML - JSP-ServletData fetching
from JSP or HTML Hi Deepak,
Can u pls help me as i have a problem with
jsp/html frameset.
my question is how can i fetch the
data from frameset which is in html format.pls help me.
Thanks
read excel data from jsp - JSP-Servletread excel
data from jsp Hi
how to read excel file
from jsp? Excel file is created manually entered
data having many sheets? and read the entire sheet and also edit with
jsp?
pls suggest me?
Hi Friend,
1
retrive values - JSP-Servletretrive values how to
retrive multiple values
from html to jsp Hi Friend,
Try the following code:
1)calljsp.html:
Enter Name:
Enter Address:
Gender:MF
Qualification:
Btech
MBA
MCA
MSC
data are not display in JSP from database - JSP-Servletdata are not display in
JSP from database
i want to finding some
data through a SQL query
from SQL server database to a
JSP page based on some... of this
jsp page. like..
School Result
and three request parameters 'class', '
from jsp retrive image - JSP-Interview Questionsjsp retrive image How to Display Images in
JSP retrieved
from MYSQL database?
plz help me.. Hi Friend,
Please visit the following link:
http://www.roseindia.net/
jsp/retrieve-image.shtml
Thanks