October 30, 2008 at 5:16 PM
Hi friend,
I am sending you data store code into the database.
<html>
<head>
<title>Insert into database</title>
</head>
<body>
<table border="1" width="50%" bgcolor="lightgreen">
<tr>
<td width="100%">
<form method="POST" action="insertAction.jsp">
<h2 align="center">Insert Data page</h2>
<table border="1" width="100%">
<tr>
<td width="50%"><b>Course Name:</b></td>
<td width="50%"><input type="text" name="coursename" size="20"/> </td>
</tr>
<tr>
<td width="50%"><b>Courese Fee:</b></td>
<td width="50%"><input type="text" name="couresefee" size="20"/> </td>
</tr>
<tr>
<td width="50%"><b>Faculty Name:</b></td>
<td width="50%"><input type="text" name="facultyname" size="50"/> </td>
</tr>
</table>
<p><input type="submit" value="Submit" name="submit">
<input type="reset" value="Reset" name="reset"></p>
</form>
</td>
</tr>
</table>
</body>
</html>
---------------------------
<%@ page language="java" import="java.sql.*" %>
<%
Connection con = null;
String url = "jdbc:
mysql://localhost:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="root" ;
String password="root";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,password);
try{
Statement st = con.createStatement();
String empname=request.getParameter("coursename");
String position=request.getParameter("couresefee");
String facultyname = request.getParameter("facultyname");
int val = st.executeUpdate("insert student values(id,'"+empname+"','"+position+"','"+facultyname+"')");
con.close();
out.println("successfully insert data into database!");
}
catch (SQLException ex){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}
%>
-------------------------------------
Please visit for more information.
http://www.roseindia.net/jsp/implement-javascript-with-jsp.shtmlThanks.
Related Tutorials/Questions & Answers:
saving data in xmlsaving data in xml Hi,
I have an xml file with spring map, in that i have parent child nodes.
I have jsp form in that i have put same parent child elements.
when i submit jsp form I want to append same
data into xml file
Saving data in databaseSaving data in database hello
i m facing a strange problem if i am submitting
data form database then i can see it in database
but if am submitting from app then it is not showing in to database but when i fetching form
Advertisements
saving data - JSP-Interview Questionssaving data Dear Sir/Madam,
Please teach me step by step how to save the
data in JSP and using crimson editor?
Thank u very much.
rodmel Hi friend,
I am sending you
data store code into the database
saving filessaving files i want to create a program that would allows me to save my file and attach
data File saving and Writing File
saving and Writing Hello Rose india.....
I have a doubt for you plzzz kindly Help me...
I have an "Arraylist" which includes some table... a "file create option"
it will be ".csv" file and i want to write the
data from
preview and saving an application form preview and
saving an application form i have developed an application form, which is to be filled by the user.That application form is big in size so i have splitted that application form in 6 different forms ie,
in first jsp
preview and saving an application form preview and
saving an application form i have developed an application form, which is to be filled by the user.That application form is big in size so i have splitted that application form in 6 different forms ie,
in first jsp
Saving image and text in mysql db using spring? Saving image and text in mysql db using spring? Hii,
My requirement is to save the employee details(including image) into mysql db.i want to save the image location in db .And actual image(binary formate) should save
storing images in directory,saving path in db2storing images in directory,
saving path in db2 i am working in a web portal that makes a simple networking site. i want to store the profiles images in a folder and its path(relative/absolute) in my DB2 database. and when
Error in laodin and saving the image . - Swing AWTError in laodin and
saving the image . I am a student who had to submit their projects......so i am working on the Photo Editor Project. But i am facing problem while laoding and
saving the image with help of JFileChooser class
java image loadin and saving problem - Swing AWTjava image loadin and
saving problem hey in this code i am trying to load a picture and save it.........but image is only visible whn we maximize the frame savin is nt done plzz help me with this code.........
import
datadata
data Handling AOP
datadata Handling
data in AOP
datadata handling examples in AOP Model
data handling examples in AOP Model
Develop user registration form
page and
saving the
data into the database.
To store the
data in the database... registration form which will
insert the entered
data into the database
successfully with the help of a servlet.
When submit button is clicked the
data What is big data science? 1000s of commodity servers for
saving and analyzing the
data.
You can check...What is big
data science? Hi,
What is big
data science?
What are the technologies to learn in Big
Data?
Thanks
Hi,
Big
Data science
Java file
Java file
Saving and loading
data to the file is one of the important feature of
many applications which requires the programmer to learn how to read from and
write
importing data and edit that data importing
data and edit that
data hello sir i have
data in excel sheet which contain 2 rows and i want to import that
data to ms access and edit that
data like adding new columns and new rows and creating new tables
big data data sciencebig
data data science Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
big
data data... the
topic "big
data data science". Also tell me which is the good
data science and data miningdata science and
data mining Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
data science and
data mining
Try to provide me good examples or tutorials links so that I
data mining data sciencedata mining
data science Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
data mining
data science
Try to provide me good examples or tutorials links so that I can
big data and data sciencebig
data and
data science Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
big
data and
data science
Try to provide me good examples or tutorials links so that I can
data science and data analyticsdata science and
data analytics Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
data science and
data analytics
Try to provide me good examples or tutorials links so
data science data analyticsdata science
data analytics Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
data science
data analytics
Try to provide me good examples or tutorials links so that I
data visualization in data sciencedata visualization in
data science Hi,
I am beginner in
Data Science and machine learning field. I am searching for
the tutorials to learn:
data visualization in
data science
Try to provide me good examples or tutorials
User Registration Action Class and DAO code (
saving data into database).
Developing Action ClassADS_TO_REPLACE_1
The Action...;
data
if (objForm.getActionUpdateData().equals("update"...());
//Add the
data
springHibernateDAO.addUser
What is Big Data and Data miningWhat is Big
Data and
Data mining Hi,
Big
Data,
Data Mining and
Data analytics are hot topic these days.
What is Big
Data and
Data mining?
Thanks
What is Big Data and Data miningWhat is Big
Data and
Data mining Hi,
Big
Data,
Data Mining and
Data analytics are hot topic these days.
What is Big
Data and
Data mining?
Thanks
data processing is data processing is
data processing is
Data processing is associated with commercial work.
Data processing is also referred as Information System.
Data processing is basically used for analyzing, processing
data tyape data tyape please give me
data type of Date
data tyape data tyape please give me
data type of Date
data tyape data type of Date please give me
data type of Date
data tyape data tyape please give me
data type of Date
What is data analysis, and how does it work? for collecting, cleansing, processing,
saving it and analyzing
data using various...What is
data analysis, and how does it work? Hi,
I want to make career in Big
Data and want to learn it.
What is
data analysis, and how does
Java Glossary Term - F;
Java File
Saving and loading
data to the file is one...
methods, final classes, final
data members, final local variables and final... of
data, to encapsulate access to the
data, to discover the functional operations
insert datainsert data i've got a problem to insert my
data to database.i can... and as well as the passed
data from mulitpart/form-
data is greater than or equal to 0...(request.getInputStream()); //we are taking the length of Content type
data int formDataLength
data typedata type which
data type is used to store video file in mysql databse
data tyape data type of date in mysql please give me
data type of Date
data tyape What
data tyape a date field req in SQL please give me
data type of Date
Real Life Uses of Data Science for cost
saving and building the brand image as an
environment friendly one.
Data...
Data Science Tutorial - Real Life Uses of
Data Science
While the overwhelming growth of digital
data is crossing all limits, putting
the
data into the right