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


View Questions and Answers by Category


Have Programming Question? Ask it here!

jsp error
1 Answer(s)      6 years ago
Posted in : JSP-Servlet

View Answers

October 29, 2008 at 10:38 AM

Hi friend,

I am sending data insert into database code.

<%@ page language="java" import="java.sql.*" %>

Connection con = null;
String url = "jdbc:mysql://";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
con = DriverManager.getConnection(url+db,userName,password);
Statement st = con.createStatement();
String userid=request.getParameter("userid");
String username = request.getParameter("username");
String address =request.getParameter("address");
String position = request.getParameter("position");
String salary = request.getParameter("salary");

int val = st.executeUpdate("insert Information values('"+userid+"','"+username+"','"+address+"','"+position+"','"+salary+"')");

out.println("successfully insert data into database!");

catch (SQLException ex){
System.out.println("SQL statement is not executed!");
catch (Exception e){



If you have any problem then send me source code and explain in detail.

Visit for more information.


Related Tutorials/Questions & Answers:
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this jsp file is</p> &lt;%@ page language... encountered an internal error () that prevented it from fulfilling this request
jsp error - JSP-Servlet
jsp error  HTTP Status 404 - /jsp... message /jsp/ description The requested resource (/jsp/) is not available..., The 404 or Not Found error message is an HTTP standard response code indicating
JSP Error - JSP-Servlet
JSP Error  When i am running my registration.jsp getting following error. HTTP Status 500... description The server encountered an internal error () that prevented it from fulfilling
jsp error - JSP-Servlet
jsp error  how to remove below error:: exception org.apache.jasper.JasperException: java.lang.NullPointerException root cause...... newpo.jsp:   JSP Page
jsp error - JSP-Servlet
jsp error  Hello, my name is sreedhar. i wrote a jsp application to generate a report from oracledata base and the report should display in Ms-excel... in detail. Visit for more information. Thanks
jsp error - JSP-Servlet
jsp error  To Upload and insert the file into oracle Database with Current Date and Time In JSP and my project is online library management system plz help how to store some books in particular folder and after how retrive
JSP Translation error - JSP-Servlet
JSP Translation error  Hello friends, In a new file declared first variable shows the following error. ----------------------------------------------- An error occurred at line: 2 in the jsp file: /stud
JScript error - JSP-Servlet
JScript error  Hello friends, I am doing jsp... logins while updating profile it will not show any error. But, in many logins it shows error as unterminated string. I am not able
Servlet Error - JSP-Servlet
/lib folder if database is mysql. servlet-api.jar jsp-api.jar mysql-connector.... Error showing ==>Admin/FirstServlet is not a servlet Sincerely Prakash   Hi prakash servlet-api.jar jsp-api.jar mysql-connector
JSP Error 500
JSP Error 500          JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding... the exception occured in JSP. is there any short cut i can do? do not want to add this line.../DAO/bean layer and not in the JSP. let me know if you have any idea. Thanks
jsp error - JDBC
jsp error   in this code the else part is nt executing atall... of that a error is like-----------"java.sql.SQLException: [Microsoft][ODBC Driver Manager... the line is not getting incremented u r getting that error just do this change
jsp runtime error - JSP-Servlet
jsp runtime error  sir, when i am running ur prog... from this website.... i did the same as per guidelines...but i got error..!!!! org.apache.jasper.JasperException
JSP SQL Error  Hi While trying to execute the below code i'm getting the following error "java.sql.SQLException: Io exception: Got minus one from a read call ". please help me out. <% try{ String Username
Script error - JSP-Servlet
running this it shows an error as "STACK OVERFLOW". Correct the code . The code... then send me jsp code. Thanks
jsp-servelet,error http404
jsp-servelet,error http404  I am using mysql commandclient to connect with eclipse using jsp and servelet. I keep getting the error hhtp 404. Register.jsp Name:<input type="text" name="userName"/><
Programming Error - JSP-Servlet
(""); } catch(SQLException se) { out.println("Database Error :"+se.getMessage()); } catch(Exception e) { out.println("General Error :"+e.getMessage... ServletException,IOException {doPost(req,res);} } There is some error
Jsp Error - Development process
Jsp Error  Hi, While executing Add_Data.jsp , am getting following error. "Data type mismatch in criteria expression." "View_Data.jsp...) at jsp_servlet.__add_data._jspService(
JSP Error Page
JSP Error Page          JSP Error Page is used to specify the custom... directive. The page errorPage.jsp shows the error generated in calling the JSP page
Tomcat error - JSP-Servlet
the error :-this is non microsoft product please see event log . what might be the reason of such error  HI, Can you paste the error log here.We
Jsp Error - Development process
Jsp Error  Hi, While executing following code "View_Service.jsp" , am getting Internal Server Error java.sql.SQLException: [Microsoft][ODBC...( at jsp_servlet.__add_data._jspService(
output error - JSP-Servlet
output error  /*hi friends, the given below is my servlet program error? How can i solve this problem? */ HTTP Status 500... report message description The server encountered an internal error
error message - JSP-Servlet
error message  hi, friends after complete my servlet programe i can type http://localhost:8080 on the browser. the servlet program is insert data into dbms. but i have errormessage that is "window can not access the specified
jsp-Hibernate Error - Hibernate
jsp-Hibernate Error  hi, my problem is, I designed an Interface where i am tring to listing the all rows of a table using Iterator and putted a link for deleting each row. I am deleteing row using row id of that delete
Programming Error - JSP-Servlet
(); } } }//End of class m geeting error in this can u please tell me whats the error nd how to solve
Programming Error - JSP-Servlet
integer.parseInt but its giving error. Please Reply me . Thank you
Error output - JSP-Servlet
Error output  Can anyone please assist me; The printed output should be: The product is 10. But instead of it I got; The product is undefined. Can anyone trace what went wrong of my code pls
Programming Error - JSP-Servlet
is access). Then how to do this in jsp?? Please Reply me?? Please do Reply
Programming Error - JSP-Servlet
??? And when i tried its giving me error than cannot find variable.In
code error - JSP-Servlet
is error in this progrm. ss function describe() { window.status