Question 10 about connecting MYSQL data with a JDBC bridge with servlets 10

Updated on technology 2024-05-03
19 answers
  1. Anonymous users2024-02-08

    Hello, it's obviously a Chinese garbled problem. I'll ask. What is the name of your database table Chinese???

  2. Anonymous users2024-02-07

    If your mysql is speechless to you.

  3. Anonymous users2024-02-06

    Can the username and password in the connection string be blank? I haven't tried it and I don't know.,It looks like it's a problem with the connection string here.。

  4. Anonymous users2024-02-05

    Hello, modify your database table. Don't use kanji. That's what I wrote when I was playing in programming.

  5. Anonymous users2024-02-04

    If there is an abnormal message, there will be a lot less information;

  6. Anonymous users2024-02-03

    Need to optimize the next **,1: Two tries should be combined into a block,2:Mainly the problem of Chinese characters,The problem of Chinese characters should be written to write a filter to process the encoding set as"gbk"

  7. Anonymous users2024-02-02

    Write a self-written processor, or not that is the problem of your data table, and then it is not possible that you did not select Chinese when installing the database.

  8. Anonymous users2024-02-01

    From the error it is clear that there is no package, and you go to the deployed server to confirm it. Try cleaning up your project, such as the clean feature of the Eclipse Project. If you don't have to copy the jar to the server completely (because it is not a network test), you can also copy it to the web-inf lib for testing.

  9. Anonymous users2024-01-31

    First: conn ="url","root","root");

    Instead: conn = ,"root","root");

    Are you sure the class name is? You can go to the driver package jar to see if the specific package location of the driver class is.

    If correct, you delete the cache files under %tomcat home%work, reboot, and try again.

  10. Anonymous users2024-01-30

    This one of yours.

    conn = "url","root","root");But it must have been written incorrectly, and I wrote an extra quotation mark.

    conn = ,"root","root");You try it instead.

    Yes, recompile, delete everything under Tomcat's work, and restart the server.

  11. Anonymous users2024-01-29

    No suitable driver If you don't have the right driver, your driver version is definitely not right!

    There is a problem hi me.

  12. Anonymous users2024-01-28

    connection conn="jdbc:mysql://"+host+"/"+dbname,username,password);

    statement stmt=;

    resultset rs=;

    This is the basic database manipulation method.

    The general process is to load the driver class, create a connection, perform a database operation, and shut it down.

  13. Anonymous users2024-01-27

    There's no difference. Just write jdbc**.

  14. Anonymous users2024-01-26

    Do you want to connect in JSP or servlet?

  15. Anonymous users2024-01-25

    You can look at it from these aspects:

    1.Check whether the jar package of sqldriver is correctly added.

    2.Check whether the connection parameters are written correctly.

    Driver Name:

    database connection url: jdbc:microsoft:sqlserver: localhost:1433; databasename=dbname

    3.The port number of the database settings is determined to be 1433 (default)4Check whether the database service is started.

    Note: When closing the connection in the finally block, you can judge whether it is empty or not, and then close if it is not empty.

    if(conn !=null ){

    Finally, it's a good idea to include a screenshot of the error or the wrong stack information.

  16. Anonymous users2024-01-24

    There is no bag, how do you look at the ** treatment.

    For general connection errors, think first of all, think about the port, the plug-in package you are connected to, and the username and password.

  17. Anonymous users2024-01-23

    Take a screenshot of the error message and take a look...

  18. Anonymous users2024-01-22

    context, rs, conn respectively; One look at the one that has a null pointer exception, and then look at the method that has this mull!

    According to your above **, I can only say so much!

  19. Anonymous users2024-01-21

    It is recommended that you go to the method of tracking to resolve null pointers.

Related questions
5 answers2024-05-03

Servlets are used for web development and as a control layer to process user requests. Servlet is the foundation of BS development, and understanding Servlet will be of great help to you in the future, JSP, and the later Struts2 framework. In normal operation, servlets are not used much, and all of them use struts2 instead of servlets to complete the functions. >>>More

4 answers2024-05-03

1.Right-click the new floder in the new project

2.Create a package named lib. >>>More

9 answers2024-05-03

Well, the left brain is responsible for the ability to analyze and deal with affairs. The right brain is responsible for the ability to emotionally, creatively, and so on. >>>More

6 answers2024-05-03

The wall painting is generally painted with acrylic, because acrylic painting cannot be erased. If you paint with gouache, the gouache paint is unstable and the color changes when it volatilizes. Painting with acrylic should also be water-soluble, adding water is more or less the same as gouache, adding water and more colors are thin and transparent. >>>More

10 answers2024-05-03

The anthropomorphic figure of speech to describe spring is as follows: >>>More