
java
jddqwe
这个作者很懒,什么都没留下…
展开
-
java连接mySQL数据库
Java连接数据库要依靠JDBC先下载mySQL的JDBC驱动。然后将驱动位置配置到环境变量classpath中。Class.forName("com.mysql.jdbc.Driver");//加载驱动conStr="jdbc:mysql://localhost:3306/mydata"; //连接字符串,此处数据库在本机地址,注意按情况修改Connection conn=D原创 2012-03-26 10:29:19 · 279 阅读 · 0 评论 -
405 HTTP method GET is not supported by this URL
HTTP Status 405 - HTTP method GET is not supported by this URL出现错误的原因: 1,继承HttpServlet的Servlet没有覆写对应请求和响应的处理方法即:doGet或 doPost等方法;默认调用了父类的doGet或doPost等方法; 2, 父类HttpServlet的doGet()或doPost()方法覆转载 2012-11-07 17:56:20 · 713 阅读 · 0 评论