Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as "jdbc:mysql://localhost:yyyy/xxx" in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please explain to me what the parameters "yyyy" and "xxx" should be? Yours Sincerely, TEH Following is part of the program: ....... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType("text/html"); PrintWriter pw = response.getWriter(); String connectionURL = "jdbc:mysql://localhost:yyyy/xxx"; Connection connection=null; try{ String username = request.getParameter("username"); String password = request.getParameter("password"); pw.println(username); pw.println(password); Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, "root", "root"); PreparedStatement pst = connection.prepareStatement ("insert into login_table values(?,?)"); .......
--------------------------------- Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when.