开发者

Why there is error HTTP status 500 in connectivity of Java with MySQL?

I created index.jsp. For first time it runs but next time it shows class not found exception: com.mysql.jdbc.Driver and after s开发者_Python百科ometime it shows HTTP status 500 error and nothing is displayed.


class not found exception:com.mysql.jdbc.Driver

The MySQL JDBC driver is missing in the runtime classpath. Download and drop MySQL JDBC driver JAR file in /WEB-INF/lib folder.


sometime it shows HTTP status 500 error

An unhandled exception was been thrown in your Java code. The stacktrace contains the answer to the cause of the problem. You need to catch and handle or to prevent the exception in your Java code.


and nothing is displayed.

The servletcontainer cannot change the response body because a part of it has already been committed. This can happen if you wrote errorneous Java code in a JSP file (which is part of the response!) instead of in a Java class which is controlled by a Servlet. The server logs should however contain the stacktrace which in turn contains the answer to the cause of the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜