I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE
org.apache.jasper.JasperException: java.lang.NumberFormatException: For input string: "8788888888"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:500)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
November 27, 2012 at 11:32 AM
Declare the telephone or mobile field in database as text and set the mobile field or telephone field as string in your code.
1)register.jsp
<html>
<form method="post" action="insert.jsp">
<table>
<tr><td>First Name:</td><td><input type="text" name="fname"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lname"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email"></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass"></td></tr>
<tr><td>Confirm Password:</td><td><input type="password" name="cpass"></td></tr>
<tr><td>Date Of Birth</td><td><input type="text" name="dob"></td></tr>
<tr><td>Age:</td><td><input type="text" name="age"></td></tr>
<tr><td>Gender</td><td><input type="text" name="gender"></td></tr>
<tr><td>Address:</td><td><input type="text" name="address"></td></tr>
<tr><td>Country</td><td><input type="text" name="country"></td></tr>
<tr><td>State:</td><td><input type="text" name="state"></td></tr>
<tr><td>City</td><td><input type="text" name="city"></td></tr>
<tr><td>Telephone No:</td><td><input type="text" name="tno"></td></tr>
<tr><td>Mobile:</td><td><input type="text" name="mobile"></td></tr>
<tr><td>Language:</td><td><select name="lang">
<option value="C/C++">C/C++</option>
<option value="C#">C#</option>
<option value="Java">Java</option>
<option value="Perl">Perl</option>
<option value="Python">Python</option>
</select></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>
2)insert.jsp:
<%@page import="java.sql.*,java.util.*"%>
<%
String fname=request.getParameter("fname");
String lname=request.getParameter("lname");
String email=request.getParameter("email");
String pass=request.getParameter("pass");
String cpass=request.getParameter("cpass");
String dob=request.getParameter("dob");
int age=Integer.parseInt(request.getParameter("age"));
String gender=request.getParameter("gender");
String address=request.getParameter("address");
String country=request.getParameter("country");
String state=request.getParameter("state");
String city=request.getParameter("city");
String telephone=request.getParameter("tno");
String mobile=request.getParameter("mobile");
String lang=request.getParameter("lang");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:access");
Statement st=con.createStatement();
int i=st.executeUpdate("insert into student(firstname,lastname,email,pass,confirm_pass,dob,age,gender,address,country,state,city,telephone,mobile,language) values('"+fname+"','"+lname+"','"+email+"','"+pass+"','"+cpass+"','"+dob+"',"+age+",'"+gender+"','"+address+"','"+country+"','"+state+"','"+city+"','"+telephone+"','"+mobile+"','"+lang+"')");
out.println("Data is successfully inserted!");
}
catch(Exception e){
System.out.print(e);
e.printStackTrace();
}
%>
Related Tutorials/Questions & Answers:
Advertisements
JSP code for registration formJSP code for
registration form Haiiii
can u please tell me how to encrypt password field in
registration form and to compare both password and confirm password fields using
jsp jsp code problem - JSP-Servletjsp code problem Hi,
I have employee details
form in
jsp. After... have a
problem with open the next
form. plz, help me.
thanks, Hi friend,
Please give me detail and
send me
error code page.
Please
jsp code error - Java Beginnersjsp code error Hi,
I have a
problem with following
code... part. Is it possible to
display a message box or alert box in
jsp code??. plz help...,Please try
Again"); i want to
display a message box instead
JSP code problem - JSP-Servlet is the
code:
Display file upload
form to the user...
JSP code problem Hi friends,
I used the following
code...;Hi Friend,
Try the following
code:
1)page.jsp:
Display file upload
code error - JSP-Servlet the
problem.
1)In "describe()" function write
code "return true";
2...
code error hii
this program is not working becoz when the mouse... is
error in this progrm.
ss
function describe()
{
window.status
Jsp Code Problem - JSP-ServletJsp Code Problem I use DocType in my
Jsp Page. The Links are not functioned after Applying the DocType. Could you tell me any way to activate the link. Thank You. Hi Friend,
Please
send your
code.
Thanks
HTML Code for registration formHTML
Code for
registration form
Here is an example of
Registration form using...
code for
registration form.
You should add following
code into your... to register on their website. The
registration
form is presented to the user where
jsp code error - JSP-Servletjsp code error hello,
is anyone here who can solve my
problem.
what happen experts where r u? r u not able to do
jsp code error - JSP-Servletjsp code error hello,
is anyone here who can solve my
problem.
what happen experts where r u?
or
u r not able to do
jsp code error - JSP-Servletjsp code error I have a
jsp page named "tMastDepartment".which has some table row containing text box like 'project
code','Departmentcode','employee... there is the
problem which i am facing.what will be the exact
code jsp code problem - JSP-Servletjsp code problem hi, I am going to execute the following
code which has been given your
jsp tutorial.
retrive_image.jsp:
but while I try to execute the
code it gives the following
error message in the tomcat
JSP code problem - JSP-ServletJSP code problem HI..
I have a DB2 stored procedure wich return a result set.
I have made a report basing on this procedure using Crystal Reports.
How to pass parameters to this procedure with java
code in a
JSP page
code for this problem - JSP-Servletcode for this problem i have buttom submit .It is working with single click.Suppose if i am At the same time clicking(parallel) twise second request will be stoped until process the proces first requst and terminate
html code for student registration formhtml
code for student
registration form
Here is an example of html
code... in student
registration form. If you will not enter value in text field than
an
error... Source
Code Student
registration form
Download Source CodeADS_TO_REPLACE_4
getting error in your login form codegetting
error in your login
form code i tried your
code for login
form but i am getting an error.the
error is undefined index userid and password.the
code is $fuser=$POST["userid"];. how to solve this
problem please help me
javascript code problem - JSP-Servlet;
">
in above
code which is
jsp and struts
form bean...javascript
code problem Thanks for sending answer.but actually what u
send is not my actual requirement.first look this
code.
Subject
User Registration Form Using JSP(JspBeans)
User
Registration Form Using
JSP(JspBeans)
... of
user
registration form using
jsp. One of the basic programming tactics...
Step 1: Create a simple
registration form (register.html):
Problem in enctype="multipart/form-data" in JSPProblem in enctype="multipart/
form-data" in JSP im using a page... in the prefered folder. i printed the path it shows correctly.
here the
code,
the
form is post method, and enctype="multipart/
form-data"
here the
code,
boolean
jsp formjsp form hi sir,
one got one got in
jsp form after entering the data into the
form the data is not saving in the database i will
send you
code of two forms if dnt understand my
problem jsp code problem - Java Beginnersjsp code problem Hi,
I have a
problem with else part. It did not show the message box when the result set is null. plz, help me. thank u in advance
display records with images problem - JSP-Servlet with a unique id. Also i wrote i
jsp that link to servlet in order to
display... (Exception e){
e.printStackTrace();
}
}
}
jsp code...,
Display images from database to visit ...
http://www.roseindia.net/
jsp servlet code problem - JSP-Servletservlet
code problem This is my
JSP code index.jsp
Sync... to servlet im stuck with this
error plzz help me...,
thanks in advance....
Hi Friend,
Which type of
error occurs?Please specify this.
Thanks
servlet code problem - JSP-Servletservlet
code problem This is my
JSP code index.jsp
Sync... with this
error plzz help me...,
in servlet if i use request.getParameter() its showing null value and i downloaded this
code from net but this also not showing
user Registration form using bean user
Registration form using bean In this
code,password and confirm password does n't matches.Every time an
error occured if i entered same string for both.Please help to sort my
problem Date Time Problem In Jsp code - Development processDate Time
Problem In
Jsp code Hi Friends,
By using this
code , am storing date and time into msaccess database. But while retriving i want to get same date and time .
send me
code for that.
SimpleDateFormat
Registration Form in HTMLRegistration Form in HTML User
Registration Form in HTML - i wanted to design a user
registration form in HTML. So, Can anyone please guide me or give me a peace of
code to design a user
registration form in HTML.
Thanks
registration formregistration form Hii.. I have to design one
registration page... have to
send verification mail to the user)
please tell me how could i design... style="margin-top : 100px" align="center" border=0>
<
form popup registration formpopup
registration form hi i want a
code for popup
registration form.when user click a button popup
form will appear.thanks.
Registration FormRegistration Form Hi Friends
I am Working on a small project.I have to create a
Registration page using MVC pattern where i have to insert data username,password,date of birth,Mobile number number into database.
How to insert
jsp code compilation error - JSP-Servletjsp code compilation error hai, iam doing online banking project.i... is the
error and also what is the proper
code for funds transfer.
HTTP... The server encountered an internal
error () that prevented it from fulfilling
form registration on JavaScript form registration on JavaScript i want
form of
registration on JavaScript > < check the name is string or number & if the name number output
error >> and the same of email and birthday and country >> <
AJAX REGISTRATION FORMAJAX
REGISTRATION FORM I have implemented user name, check and state selection using ajax, in the html
registration form. I am loading two XML... either username or state. How to implement both in same
registration form could any