新人求助
j2ee吧
全部回复
仅看楼主
level 2
在真哥Love 楼主
public class conn {
public static Connection acquireConnection()throws ClassNotFoundException,SQLException{
Connection connection=null;
try{
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
}catch(InstantiationException e){
e.printStackTrace();
}catch(IllegalAccessException e){
e.printStackTrace();
}
String url="jdbc:microsoft:sqlserver://localhost:8080/bicycle?user=sa&password=123";
connection=DriverManager.getConnection(url);
}catch(ClassNotFoundException e){
e.printStackTrace();
throw e;
}catch(SQLException e){
e.printStackTrace();
throw e;
}
return connection;
我的这个数据库连接 报405的错
HTTP Status 405 - HTTP method GET is not supported by this URL
type Status report
messageHTTP method GET is not supported by this URL
descriptionThe specified HTTP method is not allowed for the requested resource.
GlassFish Server Open Source Edition 4.1.1
我用的数据库是microsoft sql server 2014
软件用的是netbean
求大神告知,这个是什么问题,应该怎么改
2016年05月10日 11点05分 1
1