PostgreSQL connection in Java Servlet to Retrieve Information from the DB. Getting Error

前端 未结 3 993
一生所求
一生所求 2021-01-07 07:21

I am having difficulty with getting this work. I can connect to the database without problem, however I can not make it show me the html page. It does not run.



        
3条回答
  •  时光取名叫无心
    2021-01-07 07:51

    Tomcat expects that your servlet will be in a package. Yours appears to be in the default package; please add one and recompile. I'll bet things will go better for you then.

    Tomcat 6 and 7 expect to find JDBC JARs in the server /lib directory. Add your PostgreSQL JDBC JAR to the server /lib location.

提交回复
热议问题