this code will be problem it display the error again send jsp for registration form

this code will be problem it display the error again send jsp for registration form

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)

View Answers

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();
        }
        %>

Ads









Related Tutorials/Questions & Answers:
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
Advertisements
JSP code for registration form
JSP 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
userregistration code -- http://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml
userregistration code -- http://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml  While running this application on netbeans7.0 , i am getting the following error: message /userregister/ description The requested
JSP code problem - JSP-Servlet
JSP 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 to send sms alerts using jsp online
code to send sms alerts using jsp online  I am new to mobile aplication development. pls send me the code for sms alerts after clicking the button
Problem in enctype="multipart/form-data" in JSP
Problem 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 form
jsp 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
HTML(Registration form) to Jsp to stored into MS ACCESS database
HTML(Registration form) to Jsp to stored into MS ACCESS database  i... database by using jsp code.i want to urgent jsp code. please urgent sir. thank you for waiting that code. This is My Html page Link
getting error in your login form code
getting 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
HTML Code for registration form
HTML Code for registration form Here is an example of Registration form using HTML. Here a programmer can display as many "Text Field" as he/she wants...;Registration form</h2> <form action="Welcome.html" method="
code for user registration page and login page of emails using jsp
code for user registration page and login page of emails using jsp  hiiiiiii please send me the code for user registration page and login page of email using jsp and servlets and also code for database connectivity to oracle
User Registration Form Using JSP(JspBeans)
User Registration Form Using JSP(JspBeans)  ... of user registration form using jsp. One of the basic programming tactics... a simple registration form (register.html):       <
html code for student registration form
html 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... ); } OutPut: Click:Download Source Code Student registration form Download
how to display action errors in jsp which is in a form list
how to display action errors in jsp which is in a form list  My jsp contains list of forms iterating using display:table, each FORM forms a row. I want to display action errors for individual form in the same row
how to send email please give me details with code in jsp,servlet
how to send email please give me details with code in jsp,servlet  how to send email please give me details with code in jsp,servlet
Java Compilation error. Hibernate code problem. Struts first example - Hibernate
Java Compilation error. Hibernate code problem. Struts first example  Java Compilation error. Hibernate code problem. Struts first example
User Registration Form Using JSP(JspBeans) after that how i can insert in database
User Registration Form Using JSP(JspBeans) after that how i can insert in database   User Registration Form Using JSP(JspBeans) after that how i can insert in database
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
How to insert data into databse by JSP form registration page in netbeans
How to insert data into databse by JSP form registration page in netbeans  ... of data for login purpose. I have created 1 form in JSP netbeans with both username... a student. I have been given a task to create registration page with username &
How to send from netbeans gui registration form to MySQL query browser database?
How to send from netbeans gui registration form to MySQL query browser database?  Well i have a Registration form GUI in my netbeans. in my GUI... Registration form GUI. public class Register extends javax.swing.JFrame { public
How to send from netbeans gui registration form to MySQL query browser database?
How to send from netbeans gui registration form to MySQL query browser database?  Well i have a Registration form GUI in my netbeans. in my GUI... Registration form GUI. public class Register extends javax.swing.JFrame { public
Registration Form in HTML
Registration 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
Login form and registration
Login form and registration  I need a complete code for ligin and new user registration form and validation
popup registration form
popup registration form  hi i want a code for popup registration form.when user click a button popup form will appear.thanks.
registration form
registration form  Hii.. I have to design one registration page... to design captcha) submit (while clicking on submit button i have to send...="center" border=0&gt; &lt;form name="f1" action="CreateUser
How to create and use custom error page in jsp
and use custom error page in jsp and display an error message. Before run... How to create and use custom error page in jsp... as a .jsp file named "error_page.jsp" in the directory
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 >> <
JFREE error again
. but then also its giving me error i am able to compile the code but now when i am running the code i am getting expection that: Exception in thread "main...JFREE error again  hi......... As i had asked u the jfree error i
to creating a registration form
to creating a registration form  how to create a registration form
Registration Form
Registration 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
AJAX REGISTRATION FORM
AJAX 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
Pls send code
that again I want change my name click on edit button then it will generate an error pls send code...Pls send code   I am Mohini Charankar suppose Name="Mohini" Edit
jsp code for display of data from database and snap shot of the output
jsp code for display of data from database and snap shot of the output  i am using JSP.i want to insert data into database and also want to display... the following link: http://www.roseindia.net/jsp/displaydatafrom_database1.shtml
Error display
Error display  I want to give a message on the screen that an error has occured...but I dont want to use alert and give pop up box...any other solution for the problem
How to Create Student Registration Form with HTML Code?
How to Create Student Registration Form with HTML Code? At present... will learn to create a student registration form using html code in easy steps... html code for student registration form JavaScript validation has been used
jsp problem
jsp problem  problem:::::::: On JSP form ,when i insert data in text... and get assign to other field on that form........ when data is assign to other field on that form at that time firstly inserted data is not present on that form
error display
error display  I am creating a web page...I have two textboxes and an add button. If nothing has been entered in the textboxes and if I click the add button , I have to get pop up box indicating that "please fill in the fields
error log and send Database
error log and send Database  hi my requirement is validate xml and xsd in java.If there is an errors then i will log error and store into error table. so plz if any one knows send code urgent. error table details
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want... in advance.   1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want... in advance.   1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want... in advance.   1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
to create registration form
://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml... to do an assignment on to create an registration form with 20 input fields by using... just beginner for this language   Here is a jsp code that accepts several
pls send code
pls send code   pls send code for set database value into text box based on selected value in struts and jsp   use any database and get its code for getting values from google
Jsp Image Display
Jsp Image Display  Hi,i need to display image in a Box like... those who solve ma problem.. with regards, GKK   The given code allow...;<TITLE>Display file upload form to the user</TITLE></HEAD> <
PROBLEM IN FORM VALIDTION
PROBLEM IN FORM VALIDTION  i applied validation IN THIS JSP PAGE.if i... the PROBLEM is that after i press OK on validation prompt,the page goes...,not otherwise.plz hlp. Hi. Here is my code: <html> <head> <script>
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
Jsp problem
Jsp problem  Hello friends.I want to share my jsp problem.I want to show all of my database(mysql) tables except two(user,manufacturer) in a jsp page.plssss help me
Form Processing Problem
displaying according to the code.. If we upload 3 files for all the files it will display...Form Processing Problem  I am trying to create a Circular Page. This is the Code where the circular is updated and asks for Circular Reference number
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this error.my jsp file is</p> &lt;%@ page language...://www.w3.org/TR/html4/loose.dtd"> <html> <body> <form

Ads