6
Contributors
6
Replies
12
Views
6 Years
Discussion Span
Last Post by hemeneugene
1

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.

0

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

Edited by mike_2000_17: Fixed formatting

0

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.

-1

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

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

0

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

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.