Can any one send me the config setting for jdbc and mysql using apache server setting in netbean.
i wanna use jsp with xampp and jdbc

Recommended Answers

All 6 Replies

It's not an "apache setting". It is a "Web Container"/"Application Server" configuration. I.E. Tomcat, Glassfish, Sun Application Server, WebSphere, WebLogic, JBoss, Jetty, etc. Find out which one you are going to use and read its documentation.

Can any one send me the config setting for jdbc and mysql using apache server setting in netbean.

No config needed for jdbc just add your data base librairie into netBeans and create java class to connect data base

here is an exemple for use of jdbc with postgre

(URL SNIPPED)

i wanna use jsp with xampp and jdbc

For XAMPP you need to ocnfigure your server

Thanks for reply
but i already figured out the answer
and thank again for reminding me to close this thread before closing i m writing answer of my own question so it can help others

1. Go to mysql site and download "mysqlconnectorj"
2. Extract the folder in your os and choose the mysqlconnectorj jar file and place it in your desired location.
3. start netbeans -> new project choose your server(tomcat , glassfish any)
4. right click the project and click properties
5. click add jar button and browse to the location of you jar file(mysqlconnectorj) and select it .
Now you are ready to go.

may be it will help u

Class.forName("com.mysql.jdbc.Driver").newInstance();
          
                String sURL = "jdbc:mysql://localhost:3306/maxcaredb2011";
                String sUserName = "root";
                String sPwd = "password";
           Connection con1 = DriverManager.getConnection(sURL, sUserName, sPwd);
                out.print("connection" + con1);
              //insert query
                Statement st=con1.createStatement();
    int done=st.executeUpdate("insert into ................)") ;

    out.print("data is updated");
out.print("<br>Password is---" + upass);

}
catch(Exception e){

out.print("error is "+e.getMessage());
}

@coervivekmca
1. Read previous reply "Thanks for reply but i already figured out the answer "
2. Your code is recipe for disaster

how can i use session to get value from jsp to servlet and insert into the database using DAO class

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.