Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa JDBC jsp-jdbc

Have Programming Question? Ask it here!

4 Answer(s)      5 years and 7 months ago
Posted in : JDBC

View Answers

September 25, 2008 at 6:15 PM

Hi Dear,

Please Write clearly what is your requirement

and write your code also i can suggest you.

you are getting error on

request.getParameter(); its taking String parameter from other page may be that name is spelling mistake

so once again check your code.



September 25, 2008 at 11:03 PM

Dear Rajkumar,

Pl. tell me how to write the oracle query which is commented in ashok.jsp program.How should I pass request.getParameter or fname, lname, add,phones (from html input parameters), because it compiles, runs without any error but in the databse it is not stored.


<form action="ashok.jsp" method="post">

First name:<input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname"></br>
Address:<input type="text" name="address"><br>
Phone No:<input type="text" name="phone"></br>

<input type="submit" value="Submit">


<%@ page language="java" contentType="text/html"%>
<%@ page import="java.sql.*"%>
<%@ page import="*"%>

String fname="",lname="",add="",phones="";


out.println(fname);//it prints the parameter correctly

Connection con="DriverManager.getConnection("jdbc:odbc:ashokdb","scott","tiger");

Statement st=con.createStatement();

//here How I should write in oracle so that all the parameters filled in the html is stored in the oracle database named ashoktable pl.?

st.executeUpdate("insert into ashoktable values(......);");
}catch(Exception e){}


September 26, 2008 at 12:10 AM

Hi Krishna

<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Statement"%><%
String fname= request.getParameter("firstname");
String lname="";
String add = "";
String phone = "";
//do your code here
Connection con = DriverManager.getConnection("","","");
String query = "INSERT INTO ashoktable values(?,?,?,?)";

PreparedStatement pst = con.prepareStatement(query);



//OR this way alos

//String query1 = "INSERT INTO ashoktable values("+fname+"," +lname+"," + add+","+ phone +")";
//Statement stmt = con.createStatement();



September 26, 2008 at 3:22 PM

Dear Rajanikanth,
thank you very much for posting the answer.
Now the code is working.

thanks a lot.

Related Tutorials/Questions & Answers:
Query regarding JSP, JDBC
Query regarding JSP, JDBC  can I get the code for the question asked by me regarding JSP,JDBC
jsp jdbc Spring
jsp jdbc Spring  I need to create the form in jsp with one field.The field is user id. On submitting the form all the details associated... how to link the user id field of jsp with the database using spring mvc
Jsp,JDBC  Write a Program using Servlet,JSP, JDBC and XML to create a web application for a courier company to provide an online help in tracking the delivery status of items.  Hi friend, For solving the problem
jsp-jdbc - JDBC
jsp-jdbc  Hi! html- jsp-jdbc program from the html form where... jsp frequently. I am getting error through request.getParameter(). can you please...="DriverManager.getConnection("jdbc:odbc:ashokdb","scott","tiger"); Statement st
Help on JSP and JDBC - JDBC
Help on JSP and JDBC  Retrieve data from Database in JSP and JDBC...;% Connection con = null; String url = "jdbc:mysql://localhost:3306/"...;hi friend, jsp only for view , we should use for presentation don t
JSP-jdbc validation - JSP-Servlet
JSP-jdbc validation  How to validate login email id using JSP, where..., login application in jsp function validateForm(theForm... for more information.
courier management service (using servlets,jsp,jdbc)
courier management service (using servlets,jsp,jdbc)   is anyone having information about courier management service ? plz share it .its urgent THANKING YOU IN ADVANCE
jsp - JDBC
variable. JSP Page... Login Successful <%-- <jsp:forward page="studenthome.jsp"/>...   2)action.jsp: JSP
jsp - JDBC
jsp  how to link jsp code with next htmlcode.  Hi keerthi, Can u explain ur question clearly? What is your exact Requirement
jsp - JDBC
: Unable to compile class for JSP An error occurred at line: 20 in the jsp file...\localhost\Airlines-Project\org\apache\jsp\ cannot find symbol symbol : variable src location: class org.apache.jsp.Flightdetails_jsp
jsp - JDBC
jsp  -------------------------------------------------------------------------------- how to receive data into jsp from html for dropdown boxes
jsp - JDBC
about update at
jsp - JDBC
JSP Storing Data, Datatype vale in SQL   Storing Data, Datatype vale...;<%Connection con = null; String url = "jdbc:mysql://localhost:3306... to sql database using JSP and Servlet here...
JSP Store Results in Integer Format  JSP Example Code that stores the result in integer format in JSP  Hi! Just run the given JSP Example...;/b></td><% Connection con = null; String url = "jdbc:mysql
jsp - JDBC
jsp  I have one jsp code.but it is included oracle databse...("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle... = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:oracle","scott","tiger"); I
jsp - JDBC
jsp  i am doing project in java using jsp as font end and microsoft access as back end my project airline ticketing reservations how can i give hyperlink to database rows in jsp code.   First
JSP,JDBC and HTML(Very Urgent) - JSP-Servlet
JSP,JDBC and HTML(Very Urgent)  Respected Sir/Madam, Thanks... details from database using JDBC and JSP. The home page i.e HTML Page must contain... the code: I am not using any html. I used only jsp & jdbc. HOme Page
is it necessary to have depth knowledge on servlets jsp and jdbc to learn java frameworks
is it necessary to have depth knowledge on servlets jsp and jdbc to learn java... question is do i need to have depth knowledge of servlets jsp and jdbc..plz reply me asap at
JSP and JDBC - JSP-Servlet
JSP and JDBC  Respected sir/Madam, I am R.Ragavendran.. I am in urgent need of programming from roseindia team.. My requirement... for JDBC codings must be present.. NOTE: When User clicks Insert,for example
Help on JSP - JDBC
and search the database from the html file with the help of JSP.  hi...;jdbc:oracle:thin@localhost:1521:xe","scot","tiger"
JDBC in JSP   Sir, This is the code showing the problem. regards sreejith
JDBC in JSP   Sir, This is the code showing the problem. regards sreejith
JDBC in JSP  Sir, I got a problem in my jsp page which contains a delete query to delete the fields from MySql DB. The delete query is working.... Regards Sreejith  send me your jsp coding then i can understand what
Displaying Date in jsp - JDBC
in a database.i am getting input value from HTML and i use jsp application to interact with database.My JSP code for inserting Date is below: String dateStr... ----------------------------------------- Read for more information. Thanks
pagination in jsp - JDBC
. Simple pagination in jsp... ------------------   Simple pagination in jsp Simple pagination in JSP Displaying Records
servlets and jsp - JDBC
servlets and jsp  I want to display textboxes dynamically in my page using JSP and servlets (javascript for validation). For eg, consider the recruitment application form for various jobs. The name, address and tel
Java JSP  JDBC connectivity in JSP?  Hi Friend, Please visit the following link: Hope that it will be helpful for you. Thanks
Query regarding JSP, JDBC
Query regarding JSP, JDBC  I have a table in SQL Server database storing some ids and names. In my jsp code a while loop is displaying the list of names from the database as links. I want that on click of a link of name furthur
jdbc,jsp - JDBC
jdbc,jsp   this is my jsp code in this code i have to give hyperlink to database(selected row must be deplay)  Hi keerthi, replace the line
problem in creating web application using servelet, jsp, jdbc and xml - JSP-Servlet
problem in creating web application using servelet, jsp, jdbc and xml  Using Servlet, JSP, JDBC and XML create a web application for a courrier... the technologies JSP,Servlet and JDBC etc... Thanks
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc...").newInstance(); Connection connection = DriverManager.getConnection("jdbc:mysql
value is inserted into the sql table through jsp-jdbc but not getting stored into the data base,only row is increasing.
value is inserted into the sql table through jsp-jdbc but not getting stored..."> <title>JSP Page</title> <style type...=DriverManager.getConnection("jdbc:oracle:thin:@Nayna-PC:1521:orcl","scott","tiger
of tutorials on EJB, Servlet & JSP in the past editions. In all these lessons, using... a package for a JSP-Bean. Without a package, the Tomcat server may not locate the bean class at all. Hence, in all the JSP examples, the jspbean file began
Code - JSP-Servlet
Code  Using servlet,JSP,JDBC and XML create a Web application for a courrier company to provide online help in tracking the delivery status of items
online shopping code using jsp
online shopping code using jsp  plz send me the code of online shopping using jsp or jdbc or servlets plz plz help me
java - JSP-Servlet
java  write a program to develop a web application fro a courrier company to provide online help in tracking the delivery status of items by uning Servlet, JSP,JDBC and XML
create a jsp program
create a jsp program  please help , create web Application using jsp and jdbc which tacking your name,id and DOB .On clicking to submit Button it stores the information into the database and Displays alll the records
Telosys       Telosys is an Open Source framework designed to build easily Web 2.0 applications, based on a ?Client/Server? principle, using J2EE (Servlet, JSP, JDBC), lightweight clients