Hi, I visited this site for the first time.It's excellent. I want 2 improve my programming skills.Can u pls help me in making programs using JSP's and servlets.
April 10, 2008 at 7:58 PM
Hi friend
<html>
<head>
<title>Insert value in database</title>
</head>
<body>
<table border="1" width="50%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<h1><center>Insert value in Database</center></h1>
<form method="POST" action="InsertAction.jsp">
<table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="right"><b>Name:</b></td>
<td width="50%"><input type="text" name="username" size="30"></td>
</tr>
<tr>
<td width="50%" valign="right"><b>Job-Position:</b></td>
<td width="50%"><input type="text" name="jobposition" size="30"></td>
</tr>
<tr>
<td width="50%" valign="right"><b>Date:</b></td>
<td width="50%" valign="right"></td>
</tr>
</table>
<p><input type="submit" value="Submit">
<input type="reset" value="Reset"></p>
</form>
</td>
</tr>
</table>
</body>
</html>
InsertAction.jsp
<%@ page language="java" import="java.sql.*,java.util.*,java.text.*" %>
<%
Connection con = null;
String url = "jdbc:
mysql://localhost:3306/";;
String db = "register";
String driver = "com.mysql.jdbc.Driver";
java.util.Date date;
String s=null;
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,"root","root");
try{
Statement st = con.createStatement();
String username=request.getParameter("username");
String jobposition=request.getParameter("jobposition");
DateFormat dformat = new SimpleDateFormat("yyyy-MM-dd");
try{
date = new java.util.Date();
s = dformat.format(date);
out.println("Today = " + s);
}
catch(Exception e){
e.getMessage();
}
int val = st.executeUpdate("insert user_details values('"+username+"','"+jobposition+"','"+s+"')");
String query = "SELECT date FROM user_details";
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
out.println(rs.getString(1) + " " + rs.getString(2) + "<br>");
}
rs.close();
con.close();
out.println("success");
}
catch (SQLException ex){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}
%>
------------------
read for more information.
http://www.roseindia.net/jsp/http://www.roseindia.net/servlets/Hope it will help u.
Related Tutorials/Questions & Answers:
Programming skills - JSP-ServletProgramming skills Hi, I visited this site for the first time.It's excellent. I want 2 improve my
programming skills.Can u pls help me in making programs using JSP's and servlets. Hi friend<html><head><
ModuleNotFoundError: No module named 'skills'ModuleNotFoundError: No module named '
skills' Hi,
My Python... '
skills'
How to remove the ModuleNotFoundError: No module named '
skills'... to install padas library.
You can install
skills python with following command
Advertisements
ProgrammingProgramming Given a number n, write a
programming to determine its square root if it is possible, in the contraly case print an appropriate massege on the screen
How to make a career in Java Programming?How to make a career in Java
Programming?
A career in software development... efforts in learning the coding
skills. To became a professional programmer... career in the domain of java
programming and are looking for some guidance
programming Java Constructor
programming for single and double constructor write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object
Is IBM skills Gateway free?Is IBM
skills Gateway free? Hi,
I am beginner in Data Science...
skills Gateway free?
Try to provide me good examples or tutorials links so that I can learn the
topic "Is IBM
skills Gateway free?". Also tell me which
important skills for data scientistsimportant
skills for data scientists Hi,
I am beginner in Data...:
important
skills for data scientists
Try to provide me good examples or tutorials links so that I can learn the
topic "important
skills for data
data science skills resumedata science
skills resume Hi,
I am beginner in Data Science...
skills resume
Try to provide me good examples or tutorials links so that I can learn the
topic "data science
skills resume". Also tell me which
Online Java Programming Courses in honing the Java
programming skills of our students so that they
meet all the requirements of the IT market. Online Java
programming courses from
Rose India...Java
Programming Courses Online
Online Java
Programming Technology has become
top skills required to be a Data Scientist in less timetop
skills required to be a Data Scientist in less time Hi,
I want to the
skills for becoming a Data Scientist.
What are the top
skills required... || []).push({});
I have experience in other
programming language and now I
ModuleNotFoundError: No module named 'Skills-ML'ModuleNotFoundError: No module named '
Skills-ML' Hi,
My Python... '
Skills-ML'
How to remove the ModuleNotFoundError: No module named '
Skills... have to install padas library.
You can install
Skills-ML python with following
the skills required to master data science is/arethe
skills required to master data science is/are Hi,
I am beginner... to learn:
the
skills required to master data science is/are
Try to provide me...;the
skills required to master data science is/are". Also tell me which is the good
What skills are needed for a data scientist?What
skills are needed for a data scientist? Hi,
I am beginner... to learn:
What
skills are needed for a data scientist?
Try to provide me good examples or tutorials links so that I can learn the
topic "What
skills What are the skills required to be a Data Scientist? and various Mathematical calculations are
required.
Programming skills along... to develop application
for data science. But the most import
programming skills...'t
have
programming skills then you can start with the
Java and
Python
What skills you must know for a data science jobWhat
skills you must know for a data science job Hi,
I am new to
programming and going to explore the data science. I want to know the technologies... complete details. What
skills you must know for a data science job?
Thanks
What skills do you need for big data?What
skills do you need for big data? Hi,
I am beginner in Data...:
What
skills do you need for big data?
Try to provide me good examples or tutorials links so that I can learn the
topic "What
skills do you need for big
What skills do I need for machine learning?What
skills do I need for machine learning? Hi,
I am beginner... to learn:
What
skills do I need for machine learning?
Try to provide me good examples or tutorials links so that I can learn the
topic "What
skills do I need
what skills are required to become a data analystwhat
skills are required to become a data analyst Hi,
I am beginner... to learn:
what
skills are required to become a data analyst
Try to provide me...
skills are required to become a data analyst". Also tell me which is the good
What skills do I need to be a data analyst?What
skills do I need to be a data analyst? Hi,
I am beginner... to learn:
What
skills do I need to be a data analyst?
Try to provide me good examples or tutorials links so that I can learn the
topic "What
skills do I need
What are must to learn big data skills in 2018What are must to learn big data
skills in 2018 Hi,
I want to make career in Big Data. What are must to learn big data
skills in 2018?
Thanks
Hi,
In year 2018 you can learn Hadoop, Horntworks Hadoop and machine
What are must to learn big data skills in 2018What are must to learn big data
skills in 2018 Hi,
I want to make career in Big Data. What are must to learn big data
skills in 2018?
Thanks
Hi,
In year 2018 you can learn Hadoop, Horntworks Hadoop and machine
What skills are needed for a data scientist? Learning Data Science - What
skills are needed for a data scientist?
What
skills are needed for a data scientist? This is the most frequently
asked... will explore the most important
skills of Data Science that must be known by
data
What skills you need to become a data scientist?Learning Data Science: What
skills you need to become a data scientist?
We are going to discuss about the
skills that you must master to become a
productive... productive data scientists. Data Scientists must learning
programming,
mathematics
Java ProgrammingJava Programming Hi,
What is Java
Programming? How I can learn Java
Programming in one month?
Thanks
Top 10 Web Development SkillsTop 10 Web Development
Skills
For an ambitious web developer or web designer to stay updated with the latest range of technical
skills and exposure to recent... in career as a developer or designer. To talk of top 10 web development
skills we
r programmingr programming Hi,
How r
programming is playing a big role in the Big Data time?
These days companies are employing programmers with R
Programming... in the market.
Whey r
programming is so important?
Thanks
R
Ajax programmingAjax programming Hi,
How I can start ajax
programming easily? I... concept.
What should be my starting point for Ajax
programming?
Thanks
Hi,
If you have prior
programming experience in any web development
Programming with JSPProgramming with JSP Write a program using jsp that accepts a course code as input and displays the course title
the program to which it belongs
Programming (general)Programming (general) I haven't yet started college/university but I'm interested in studying
programming. I wondering if
programming is difficult or confusing with all the codes you have to learn? Also how many languages would
programming of foxproprogramming of foxpro hello sir ,
sir i am use the foxpro . but i know about c . sir how can i learn fox pro . i know about something about foxpro
programming conceptprogramming concept Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule
Top 10 Web Development Skills You Need conversion comes. To talk about top 10 web development
skills you need we face... these
skills on a continuous basis as you can focus on your priority as per the most... preferred web development
skills.
SEO
SEO or search engine optimization
programming errorprogramming error I got an error when i did the following program
the prg. is to "select the name from database when the age is given for the respective name"
error i got is:SQL exception
please give me the solution by providing
Socket ProgrammingSocket Programming How to connect a computer through IP only and check whether it is up and running? I can't see any method in Socket
programming where I can pass only IP address as argument. I need the pass port number also
C ProgrammingC Programming hi,how can i write a program in C
programming to place reservation in air plane from the menu let the user to inter his/her gender(W or M)and draw seats by using ascii codes and choose where he/she will sit
programming for data scienceprogramming for data science Hi,
I am beginner in Data Science...:
programming for data science
Try to provide me good examples or tutorials links so that I can learn the
topic "
programming for data science". Also tell me
udacity programming for data scienceudacity
programming for data science Hi,
I am beginner in Data...:
udacity
programming for data science
Try to provide me good examples or tutorials links so that I can learn the
topic "udacity
programming for data
programming for data science nanodegreeprogramming for data science nanodegree Hi,
I am beginner in Data...:
programming for data science nanodegree
Try to provide me good examples or tutorials links so that I can learn the
topic "
programming for data science